Exemplo n.º 1
0
        public AbstractAspNetCoreFileManagerMiddleware(
            [AspNetCoreDashboard.Annotations.NotNull] RequestDelegate next,
            //[NotNull] JobStorage storage,
            //[NotNull] DashboardOptions options,
            [NotNull] IEnumerable <IDashboardAuthorizationFilter> authorization,
            [NotNull] RouteCollection routes
            ) : base(next)
        {
            if (next == null)
            {
                throw new ArgumentNullException(nameof(next));
            }
            //if (storage == null) throw new ArgumentNullException(nameof(storage));
            //if (options == null) throw new ArgumentNullException(nameof(options));
            if (routes == null)
            {
                throw new ArgumentNullException(nameof(routes));
            }

            _next = next;
            //_storage = storage;
            _authorization = authorization ?? new IDashboardAuthorizationFilter[] { };
            //_options = options;
            _routes = routes;
        }
Exemplo n.º 2
0
 public AspNetCoreFileManagerMiddleware(
     [NotNull] RequestDelegate next,
     [NotNull] IEnumerable <IDashboardAuthorizationFilter> authorization,
     [NotNull] RouteCollection routes
     ) : base(next, authorization, routes)
 {
 }
 public HttpGetSchemaMiddleware(
     HttpRequestDelegate next,
     IRequestExecutorResolver executorResolver,
     IHttpResultSerializer resultSerializer,
     NameString schemaName)
     : base(next, executorResolver, resultSerializer, schemaName)
 {
 }
Exemplo n.º 4
0
 public WebSocketSubscriptionMiddleware(
     RequestDelegate next,
     IRequestExecutorResolver executorResolver,
     IHttpResultSerializer resultSerializer,
     NameString schemaName)
     : base(next, executorResolver, resultSerializer, schemaName)
 {
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SunnyMiddleware"/> class.
 /// </summary>
 /// <param name="next">The next.</param>
 /// <param name="logger">The logger.</param>
 public SunnyMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, ISunnyApplication <DefaultSunnyApplication.Context> app
                        , ILogger <SunnyMiddleware> logger)
 {
     this._next       = next;
     this._logger     = logger;
     this.application = app;
     this.features    = new DefaultFeatureCollection();
 }
Exemplo n.º 6
0
 /// <summary>
 /// Creates a new instance of the DefaultFilesMiddleware.
 /// </summary>
 /// <param name="next">The next middleware in the pipeline.</param>
 /// <param name="fileProvider">The <see cref="IFileProvider"/> used by this middleware.</param>
 /// <param name="matchUrl">The match url.</param>
 public ToolDefaultFileMiddleware(
     RequestDelegate next,
     IFileProvider fileProvider,
     PathString matchUrl)
 {
     _next         = next ?? throw new ArgumentNullException(nameof(next));
     _fileProvider = fileProvider ?? throw new ArgumentNullException(nameof(fileProvider));
     _matchUrl     = matchUrl;
 }
Exemplo n.º 7
0
 public ToolOptionsFileMiddleware(
     HttpRequestDelegate next,
     IRequestExecutorResolver executorResolver,
     IHttpResultSerializer resultSerializer,
     NameString schemaName,
     PathString matchUrl)
     : base(next, executorResolver, resultSerializer, schemaName)
 {
     _matchUrl = matchUrl;
 }
Exemplo n.º 8
0
 public LetsEncryptChallengeApprovalMiddleware(
     Microsoft.AspNetCore.Http.RequestDelegate next
     , Microsoft.Extensions.Logging.ILogger <LetsEncryptChallengeApprovalMiddleware> logger
     // ,IPersistenceService persistenceService
     )
 {
     _next   = next;
     _logger = logger;
     // _persistenceService = persistenceService;
 }
 public ToolOptionsFileMiddleware(
     HttpRequestDelegate next,
     IRequestExecutorResolver executorResolver,
     IHttpResultSerializer resultSerializer,
     NameString schemaName,
     PathString matchUrl)
     : base(next, executorResolver, resultSerializer, schemaName)
 {
     _contentTypeProvider = new FileExtensionContentTypeProvider();
     _matchUrl            = matchUrl;
 }
 public HttpMultipartMiddleware(
     HttpRequestDelegate next,
     IRequestExecutorResolver executorResolver,
     IHttpResultSerializer resultSerializer,
     IHttpRequestParser requestParser,
     NameString schemaName,
     IOptions <FormOptions> formOptions)
     : base(next, executorResolver, resultSerializer, requestParser, schemaName)
 {
     _formOptions = formOptions.Value;
 }
Exemplo n.º 11
0
 public HttpPostMiddleware(
     HttpRequestDelegate next,
     IRequestExecutorResolver executorResolver,
     IHttpResultSerializer resultSerializer,
     IHttpRequestParser requestParser,
     NameString schemaName)
     : base(next, executorResolver, resultSerializer, schemaName)
 {
     _requestParser = requestParser ??
                      throw new ArgumentNullException(nameof(requestParser));
 }
 public HttpGetSchemaMiddleware(
     HttpRequestDelegate next,
     IRequestExecutorResolver executorResolver,
     IHttpResultSerializer resultSerializer,
     IServerDiagnosticEvents diagnosticEvents,
     NameString schemaName,
     MiddlewareRoutingType routing)
     : base(next, executorResolver, resultSerializer, schemaName)
 {
     _diagnosticEvents = diagnosticEvents ??
                         throw new ArgumentNullException(nameof(diagnosticEvents));
     _routing = routing;
 }
Exemplo n.º 13
0
 public HttpPostMiddleware(
     HttpRequestDelegate next,
     IRequestExecutorResolver executorResolver,
     IHttpResultSerializer resultSerializer,
     IRequestParser requestParser,
     NameString schemaName)
 {
     _next             = next;
     _executorResolver = executorResolver;
     _resultSerializer = resultSerializer;
     _requestParser    = requestParser;
     _schemaName       = schemaName;
     executorResolver.RequestExecutorEvicted += EvictRequestExecutor;
 }
Exemplo n.º 14
0
 public HttpGetMiddleware(
     HttpRequestDelegate next,
     IRequestExecutorResolver executorResolver,
     IHttpResultSerializer resultSerializer,
     IHttpRequestParser requestParser,
     IServerDiagnosticEvents diagnosticEvents,
     NameString schemaName)
     : base(next, executorResolver, resultSerializer, schemaName)
 {
     _requestParser = requestParser ??
                      throw new ArgumentNullException(nameof(requestParser));
     _diagnosticEvents = diagnosticEvents ??
                         throw new ArgumentNullException(nameof(diagnosticEvents));
 }
Exemplo n.º 15
0
        protected MiddlewareBase(
            RequestDelegate next,
            IRequestExecutorResolver executorResolver,
            IHttpResultSerializer resultSerializer,
            NameString schemaName)
        {
            _next = next ??
                    throw new ArgumentNullException(nameof(next));
            _executorResolver = executorResolver ??
                                throw new ArgumentNullException(nameof(executorResolver));
            _resultSerializer = resultSerializer ??
                                throw new ArgumentNullException(nameof(executorResolver));
            SchemaName = schemaName;

            executorResolver.RequestExecutorEvicted += EvictRequestExecutor;
        }
Exemplo n.º 16
0
        protected MiddlewareBase(
            RequestDelegate next,
            IRequestExecutorResolver executorResolver,
            IHttpResultSerializer resultSerializer,
            NameString schemaName)
        {
            if (executorResolver == null)
            {
                throw new ArgumentNullException(nameof(executorResolver));
            }

            _next = next ??
                    throw new ArgumentNullException(nameof(next));
            _resultSerializer = resultSerializer ??
                                throw new ArgumentNullException(nameof(executorResolver));
            SchemaName    = schemaName;
            ExecutorProxy = new RequestExecutorProxy(executorResolver, schemaName);
        }
Exemplo n.º 17
0
    /// <summary>
    /// Creates a new instance of the StaticFileMiddleware.
    /// </summary>
    /// <param name="next">The next middleware in the pipeline.</param>
    /// <param name="hostingEnv">The <see cref="IWebHostEnvironment"/> used by this middleware.</param>
    /// <param name="options">The configuration options.</param>
    /// <param name="loggerFactory">An <see cref="ILoggerFactory"/> instance used to create loggers.</param>
    public ToolStaticFileMiddleware(
        RequestDelegate next,
        IFileProvider fileProvider,
        PathString matchUrl)
    {
        if (next is null)
        {
            throw new ArgumentNullException(nameof(next));
        }

        if (fileProvider is null)
        {
            throw new ArgumentNullException(nameof(fileProvider));
        }

        _next = next;
        _contentTypeProvider = new FileExtensionContentTypeProvider();
        _fileProvider        = fileProvider;
        _matchUrl            = matchUrl;
    }
Exemplo n.º 18
0
 public TerminatorMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next)
 {
     _next = next;
 }
Exemplo n.º 19
0
 public HttpNetRpcMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next)
 {
     _next = next;
 }
Exemplo n.º 20
0
 public ExceptionMiddleware(RequestDelegate next, ILogger <ExceptionMiddleware> logger, IHostEnvironment env)
 {
     _env    = env;
     _logger = logger;
     _next   = next;
 }
Exemplo n.º 21
0
 public ErrorHandlingMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next)
 {
     this.next = next;
 } // End Constructor
Exemplo n.º 22
0
 public SwaggerUiIndexMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next)
 {
     _next = next;
 }
Exemplo n.º 23
0
 public SlickListMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next)
     : base(_COR.Mandant.Global, System.Data.SqlClient.SqlClientFactory.Instance)
 {
     this._next = next;
 } // End Constructor
Exemplo n.º 24
0
 public SwaggerUiIndexMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, IEnumerable <IInjectSwaggerHtml> injectSwaggerHtmlList)
 {
     _next = next;
     _injectSwaggerHtmlList = injectSwaggerHtmlList;
 }
 public ExceptionHandlerMiddleware(RequestDelegate next, ILogger <ExceptionHandlerMiddleware> logger)
 {
     _next   = next;
     _logger = logger;
 }
Exemplo n.º 26
0
 public AMiddleware(RequestDelegate next)
 {
     _next = next;
 }
Exemplo n.º 27
0
 public AshxMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Hosting.IHostingEnvironment env)
 {
     this.m_next = next;
     this.m_env  = env;
 }
 public ExceptionHandlingMiddleware
     (Microsoft.AspNetCore.Http.RequestDelegate next) : base()
 {
     Next = next;
 }
Exemplo n.º 29
0
 public DataFeedMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next)
 {
     this._next = next;
 }
 public ToolOptionsFileMiddleware(HttpRequestDelegate next, PathString matchUrl)
 {
     _next     = next ?? throw new ArgumentNullException(nameof(next));
     _matchUrl = matchUrl;
 }