using System; namespace Quadarax.Foundation.Core.Attributes { [AttributeUsage(AttributeTargets.Class,AllowMultiple = true)] public class DiImplementsOfAttribute : Attribute { public Type InterfaceTypeImplementing { get; } public LifeCycleTypeEnum LifeCycleType { get; } public DiImplementsOfAttribute(Type interfaceType, LifeCycleTypeEnum lifeCycleType) { if (interfaceType == null) throw new ArgumentNullException(nameof(interfaceType)); if (!interfaceType.IsInterface) throw new ArgumentException("DiImplementsOf expects interface type", nameof(interfaceType)); LifeCycleType = lifeCycleType; InterfaceTypeImplementing = interfaceType; } } }