public CommandRPipelineBehavior( IOptions <CommandROptions> optionsAccessor, IHttpContextAccessor httpContextAccessor, ILogger <CommandRPipelineBehavior <TRequest, TResponse> > logger, IServiceProvider serviceProvider ) { _options = optionsAccessor.Value; _httpContext = httpContextAccessor.HttpContext; _logger = logger; _serviceProvider = serviceProvider; }
public DefaultRequestResolver( IOptions <CommandROptions> optionsAccessor ) { _options = optionsAccessor.Value; var interfaceType = typeof(IBaseRequest); _requestTypes = ( from assembly in AppDomain.CurrentDomain.GetAssemblies().Where(a => !a.IsDynamic) from type in assembly.GetTypes() where type.IsClass let implementedType = type.GetTypeInfo().ImplementedInterfaces.FirstOrDefault() where interfaceType.IsAssignableFrom(implementedType) select type ).ToList(); }