public LightweightAdapterRegistrationSource(
            RegistrationData registrationData,
            LightweightAdapterActivatorData activatorData)
        {
            if (registrationData == null) throw new ArgumentNullException("registrationData");
            if (activatorData == null) throw new ArgumentNullException("activatorData");

            _registrationData = registrationData;
            _activatorData = activatorData;

            if (registrationData.Services.Contains(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));
        }
		public LightweightAdapterRegistrationSource(
			RegistrationData registrationData,
			LightweightAdapterActivatorData activatorData)
		{
			if (registrationData == null) throw new ArgumentNullException("registrationData");
			if (activatorData == null) throw new ArgumentNullException("activatorData");

			_registrationData = registrationData;
			_activatorData = activatorData;

			if (registrationData.Services.Contains(activatorData.FromService))
				throw new ArgumentException(string.Format(
					LightweightAdapterRegistrationSourceResources.FromAndToMustDiffer, activatorData.FromService));
		}
Beispiel #3
0
        public LightweightAdapterRegistrationSource(
            RegistrationData registrationData,
            LightweightAdapterActivatorData activatorData)
        {
            if (registrationData == null)
            {
                throw new ArgumentNullException("registrationData");
            }
            if (activatorData == null)
            {
                throw new ArgumentNullException("activatorData");
            }

            _registrationData = registrationData;
            _activatorData    = activatorData;

            if (registrationData.Services.Contains(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));
            }
        }
Beispiel #4
0
        public LightweightAdapterRegistrationSource(
            RegistrationData registrationData,
            LightweightAdapterActivatorData activatorData)
        {
            if (registrationData == null)
            {
                throw new ArgumentNullException("registrationData");
            }
            if (activatorData == null)
            {
                throw new ArgumentNullException("activatorData");
            }

            _registrationData = registrationData;
            _activatorData    = activatorData;

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