/// <summary> /// Initializes a new instance of the <see cref="OpenGenericDecoratorMiddlewareSource"/> class. /// </summary> /// <param name="decoratorService">The decorator service.</param> /// <param name="registrationData">The registration data for the decorator.</param> /// <param name="activatorData">The activator data for the decorator.</param> public OpenGenericDecoratorMiddlewareSource(DecoratorService decoratorService, RegistrationData registrationData, ReflectionActivatorData activatorData) { _decoratorService = decoratorService ?? throw new ArgumentNullException(nameof(decoratorService)); _registrationData = registrationData ?? throw new ArgumentNullException(nameof(registrationData)); _activatorData = activatorData ?? throw new ArgumentNullException(nameof(activatorData)); OpenGenericServiceBinder.EnforceBindable(activatorData.ImplementationType, registrationData.Services); }
public OpenGenericRegistrationSource(RegistrationData registrationData, ReflectionActivatorData activatorData) { if (registrationData == null) { throw new ArgumentNullException("registrationData"); } if (activatorData == null) { throw new ArgumentNullException("activatorData"); } OpenGenericServiceBinder.EnforceBindable(activatorData.ImplementationType, registrationData.Services); this._registrationData = registrationData; this._activatorData = activatorData; }
/// <summary> /// Initializes a new instance of the <see cref="OpenGenericRegistrationSource"/> class. /// </summary> /// <param name="registrationData">The registration data for the open generic.</param> /// <param name="existingPipelineBuilder">The pipeline for the existing open generic registration.</param> /// <param name="activatorData">The activator data.</param> public OpenGenericRegistrationSource( RegistrationData registrationData, IResolvePipelineBuilder existingPipelineBuilder, ReflectionActivatorData activatorData) { if (registrationData == null) { throw new ArgumentNullException(nameof(registrationData)); } if (activatorData == null) { throw new ArgumentNullException(nameof(activatorData)); } OpenGenericServiceBinder.EnforceBindable(activatorData.ImplementationType, registrationData.Services); _registrationData = registrationData; _existingPipelineBuilder = existingPipelineBuilder; _activatorData = activatorData; }
public RegistrationBuilder(Service defaultService) { RegistrationData = new RegistrationData(defaultService); Activator = new ReflectionActivatorData(typeof(TLimit)).Activator; RegistrationInfo = new RegistrationInfo(); }