BITFALL/Assets/BITKit/Core/Attributes/IBITCommand.cs

41 lines
1.0 KiB
C#
Raw Normal View History

2023-08-12 01:43:24 +08:00
using System;
namespace BITKit
{
[AttributeUsage(AttributeTargets.Method)]
public class BITCommandAttribute : Attribute { }
2023-10-20 19:31:12 +08:00
/// <summary>
/// 自动注入依赖
/// </summary>
2023-08-12 01:43:24 +08:00
[AttributeUsage(AttributeTargets.Field)]
public class InjectAttribute : System.Attribute
{
2023-10-20 19:31:12 +08:00
public readonly bool CanBeNull;
public InjectAttribute()
{
}
public InjectAttribute(bool canBeNull)
{
CanBeNull = canBeNull;
}
2023-08-12 01:43:24 +08:00
}
2023-10-20 19:31:12 +08:00
2023-10-02 23:24:56 +08:00
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true, Inherited = true)]
public class CustomTypeAttribute : System.Attribute
{
public readonly Type Type;
public CustomTypeAttribute(Type type)
{
Type = type;
}
}
2023-10-20 19:31:12 +08:00
#if UNITY_64
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true, Inherited = true)]
public class ExportAttribute : System.Attribute
{
}
#endif
2023-08-12 01:43:24 +08:00
}