3.0 - unitypackage

This commit is contained in:
monitor1394
2022-01-05 21:40:48 +08:00
parent c160867765
commit 228a4b2840
846 changed files with 105 additions and 467693 deletions

View File

@@ -0,0 +1,42 @@
using System;
namespace XCharts
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class CoordOptionsAttribute : Attribute
{
public readonly Type type0;
public readonly Type type1;
public readonly Type type2;
public readonly Type type3;
public CoordOptionsAttribute(Type coord)
{
type0 = coord;
}
public CoordOptionsAttribute(Type coord, Type coord2)
{
type0 = coord;
type1 = coord2;
}
public CoordOptionsAttribute(Type coord, Type coord2, Type coord3)
{
type0 = coord;
type1 = coord2;
type2 = coord3;
}
public CoordOptionsAttribute(Type coord, Type coord2, Type coord3, Type coord4)
{
type0 = coord;
type1 = coord2;
type2 = coord3;
type3 = coord4;
}
public bool Contains<T>() where T : CoordSystem
{
var type = typeof(T);
return (type == type0 || type == type1 || type == type2 || type == type3);
}
}
}