using System; namespace BITKit { [AttributeUsage(AttributeTargets.Method)] public class BITCommandAttribute : Attribute { } /// /// 自动注入依赖 /// [AttributeUsage(AttributeTargets.Field)] public class InjectAttribute : System.Attribute { public readonly bool CanBeNull; public InjectAttribute() { } public InjectAttribute(bool canBeNull) { CanBeNull = canBeNull; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, AllowMultiple = true, Inherited = true)] public class CustomTypeAttribute : System.Attribute { public readonly Type Type; public readonly bool AsGlobal; public CustomTypeAttribute(Type type) { Type = type; } public CustomTypeAttribute(Type type, bool asGlobal) { Type = type; AsGlobal = asGlobal; } public CustomTypeAttribute(bool asGlobal) { AsGlobal = asGlobal; } } #if Godot #else [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Field | AttributeTargets.Method, AllowMultiple = true, Inherited = true)] public class ExportAttribute : System.Attribute { public readonly string Name; public readonly IExportSetting Settings; public ExportAttribute(){} public ExportAttribute(IExportSetting settings) { Settings = settings; } public ExportAttribute(string name) { Name = name; } } public interface IExportSetting{} #endif }