Tri-Inspector/Editor/Attributes.cs

104 lines
3.1 KiB
C#
Raw Normal View History

2021-12-07 10:20:36 -05:00
using System;
namespace TriInspector
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
2022-01-06 12:11:27 -05:00
public class RegisterTriValueDrawerAttribute : Attribute
2021-12-07 10:20:36 -05:00
{
2022-01-06 12:11:27 -05:00
public RegisterTriValueDrawerAttribute(Type drawerType, int order)
2021-12-07 10:20:36 -05:00
{
DrawerType = drawerType;
Order = order;
}
public Type DrawerType { get; }
public int Order { get; }
2022-01-09 11:24:45 -05:00
public bool ApplyOnArrayElement { get; set; } = true;
2022-01-06 12:11:27 -05:00
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public class RegisterTriAttributeDrawerAttribute : Attribute
{
public RegisterTriAttributeDrawerAttribute(Type drawerType, int order)
{
DrawerType = drawerType;
Order = order;
}
public Type DrawerType { get; }
public int Order { get; }
2022-01-09 11:24:45 -05:00
public bool ApplyOnArrayElement { get; set; }
2021-12-07 10:20:36 -05:00
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public class RegisterTriGroupDrawerAttribute : Attribute
{
public RegisterTriGroupDrawerAttribute(Type drawerType)
{
DrawerType = drawerType;
}
public Type DrawerType { get; }
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public class RegisterTriPropertyHideProcessor : Attribute
{
public RegisterTriPropertyHideProcessor(Type processorType)
{
ProcessorType = processorType;
}
public Type ProcessorType { get; }
public bool ApplyOnArrayElement { get; set; }
}
2022-01-06 12:11:27 -05:00
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public class RegisterTriPropertyDisableProcessor : Attribute
{
public RegisterTriPropertyDisableProcessor(Type processorType)
{
ProcessorType = processorType;
}
public Type ProcessorType { get; }
public bool ApplyOnArrayElement { get; set; }
}
2022-01-15 11:25:12 -05:00
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public class RegisterTriValueValidatorAttribute : Attribute
{
public RegisterTriValueValidatorAttribute(Type validatorType)
{
ValidatorType = validatorType;
}
public Type ValidatorType { get; }
public bool ApplyOnArrayElement { get; set; } = true;
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public class RegisterTriAttributeValidatorAttribute : Attribute
{
public RegisterTriAttributeValidatorAttribute(Type validatorType)
{
ValidatorType = validatorType;
}
public Type ValidatorType { get; }
public bool ApplyOnArrayElement { get; set; }
}
2022-08-17 13:16:23 -04:00
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public class RegisterTriTypeProcessorAttribute : Attribute
{
public RegisterTriTypeProcessorAttribute(Type processorType, int order)
{
ProcessorType = processorType;
Order = order;
}
public Type ProcessorType { get; }
public int Order { get; }
}
2021-12-07 10:20:36 -05:00
}