Update editor
This commit is contained in:
28
Ghost.Editor.Core/EditorInjectionAttribute.cs
Normal file
28
Ghost.Editor.Core/EditorInjectionAttribute.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
namespace Ghost.Editor.Core;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false, Inherited = false)]
|
||||
public class EditorInjectionAttribute : Attribute
|
||||
{
|
||||
public enum ServiceLifetime
|
||||
{
|
||||
Singleton,
|
||||
Transient,
|
||||
Scoped
|
||||
}
|
||||
|
||||
public ServiceLifetime Lifetime
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public Type? ImplementationType
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public EditorInjectionAttribute(ServiceLifetime lifetime, Type? implementationType = null)
|
||||
{
|
||||
Lifetime = lifetime;
|
||||
ImplementationType = implementationType;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user