Example #1
0
        public ServiceAttribute(
            Type serviceInterface,
            ServiceLifetime lifetime,
            ServiceVisibility visibility)
        {
            if (serviceInterface != null && !serviceInterface.IsInterface)
            {
                throw new ArgumentException("Type must be an interface type");
            }

            this.ServiceInterface = serviceInterface;
            this.Lifetime         = lifetime;
            this.Visibility       = visibility;
        }
Example #2
0
 public ServiceAttribute(ServiceLifetime lifetime, ServiceVisibility visibility)
     : this(null, lifetime, visibility)
 {
 }