mirror of
https://github.com/DCFApixels/DragonECS-AutoInjections.git
synced 2026-04-21 23:15:54 +08:00
31 lines
926 B
C#
31 lines
926 B
C#
#if DISABLE_DEBUG
|
|
#undef DEBUG
|
|
#endif
|
|
using System;
|
|
|
|
namespace DCFApixels.DragonECS
|
|
{
|
|
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
|
|
public class DIAttribute : Attribute
|
|
{
|
|
public static readonly DIAttribute Dummy = new DIAttribute();
|
|
public readonly Type NotNullDummyType = null;
|
|
public readonly string NamedInjection = string.Empty;
|
|
public DIAttribute() { }
|
|
public DIAttribute(string namedInjection)
|
|
{
|
|
NamedInjection = namedInjection;
|
|
}
|
|
public DIAttribute(Type notNullDummyType)
|
|
{
|
|
NotNullDummyType = notNullDummyType;
|
|
}
|
|
public DIAttribute(string namedInjection, Type notNullDummyType)
|
|
{
|
|
NamedInjection = namedInjection;
|
|
NotNullDummyType = notNullDummyType;
|
|
}
|
|
}
|
|
}
|
|
|