Describes the activator for an open generic decorator.
상속: Revenj.Extensibility.Autofac.Builder.ReflectionActivatorData
		public OpenGenericDecoratorRegistrationSource(
			RegistrationData registrationData,
			OpenGenericDecoratorActivatorData activatorData)
		{
			if (registrationData == null) throw new ArgumentNullException("registrationData");
			if (activatorData == null) throw new ArgumentNullException("activatorData");

			OpenGenericServiceBinder.EnforceBindable(activatorData.ImplementationType, registrationData.Services);

			if (registrationData.Services.Contains((Service)activatorData.FromService))
				throw new ArgumentException(string.Format(
					OpenGenericDecoratorRegistrationSourceResources.FromAndToMustDiffer, activatorData.FromService));

			_registrationData = registrationData;
			_activatorData = activatorData;
		}
        public OpenGenericDecoratorRegistrationSource(
            RegistrationData registrationData,
            OpenGenericDecoratorActivatorData activatorData)
        {
            if (registrationData == null) throw new ArgumentNullException("registrationData");
            if (activatorData == null) throw new ArgumentNullException("activatorData");

            OpenGenericServiceBinder.EnforceBindable(activatorData.ImplementationType, registrationData.Services);

            if (registrationData.Services.Contains((Service)activatorData.FromService))
                throw new ArgumentException(string.Format(
                    "The service {0} cannot be both the adapter's from and to parameters - these must differ.", activatorData.FromService));

            _registrationData = registrationData;
            _activatorData = activatorData;
        }
        public OpenGenericDecoratorRegistrationSource(
            RegistrationData registrationData,
            OpenGenericDecoratorActivatorData activatorData)
        {
            if (registrationData == null)
            {
                throw new ArgumentNullException("registrationData");
            }
            if (activatorData == null)
            {
                throw new ArgumentNullException("activatorData");
            }

            OpenGenericServiceBinder.EnforceBindable(activatorData.ImplementationType, registrationData.Services);

            if (registrationData.Services.Contains((Service)activatorData.FromService))
            {
                throw new ArgumentException(string.Format(
                                                "The service {0} cannot be both the adapter's from and to parameters - these must differ.", activatorData.FromService));
            }

            _registrationData = registrationData;
            _activatorData    = activatorData;
        }
예제 #4
0
        public OpenGenericDecoratorRegistrationSource(
            RegistrationData registrationData,
            OpenGenericDecoratorActivatorData activatorData)
        {
            if (registrationData == null)
            {
                throw new ArgumentNullException("registrationData");
            }
            if (activatorData == null)
            {
                throw new ArgumentNullException("activatorData");
            }

            OpenGenericServiceBinder.EnforceBindable(activatorData.ImplementationType, registrationData.Services);

            if (registrationData.Services.Contains((Service)activatorData.FromService))
            {
                throw new ArgumentException(string.Format(
                                                OpenGenericDecoratorRegistrationSourceResources.FromAndToMustDiffer, activatorData.FromService));
            }

            _registrationData = registrationData;
            _activatorData    = activatorData;
        }