You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Connected.Framework/Connected.Runtime/Annotations/ServiceRegistrationAttribut...

29 lines
639 B

namespace Connected.Annotations
{
public enum ServiceRegistrationMode
{
Auto = 1,
Manual = 2
}
public enum ServiceRegistrationScope
{
Singleton = 1,
Scoped = 2,
Transient = 3
}
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class ServiceRegistrationAttribute : Attribute
{
public ServiceRegistrationAttribute(ServiceRegistrationMode mode, ServiceRegistrationScope scope)
{
Mode = mode;
Scope = scope;
}
public ServiceRegistrationMode Mode { get; } = ServiceRegistrationMode.Auto;
public ServiceRegistrationScope Scope { get; } = ServiceRegistrationScope.Scoped;
}
}