Exemple #1
0
        void UseWebApi(IPipelineBuilderEnvironment builderEnv)
        {
            _WebApiMiddleware.AreFormNamesCaseSensitive        = false;
            _WebApiMiddleware.AreQueryStringNamesCaseSensitive = false;

            builderEnv.UseMiddlewareBuilder(_WebApiMiddleware.AppFuncBuilder);
        }
        private void UseWebApi(IPipelineBuilderEnvironment builderEnv)
        {
            var webApi = Factory.Resolve <IWebApiMiddleware>();

            webApi.AreFormNamesCaseSensitive        = false;
            webApi.AreQueryStringNamesCaseSensitive = false;

            builderEnv.UseMiddlewareBuilder(webApi.AppFuncBuilder);
        }
Exemple #3
0
        void UseSetupTestEnvironment(IPipelineBuilderEnvironment builderEnv)
        {
            // The intention is for this to get called at the start of the pipeline
            Func <AppFunc, AppFunc> appFuncBuilder = (Func <IDictionary <string, object>, Task> next) =>
            {
                return(async(IDictionary <string, object> environment) => {
                    environment["server.RemoteIpAddress"] = _RemoteIpAddress;
                    await next(environment);
                });
            };

            builderEnv.UseMiddlewareBuilder(appFuncBuilder);
        }
Exemple #4
0
 private void UseShimAppFuncBuilder(IPipelineBuilderEnvironment builderEnv)
 {
     _OldServerShim = new WebServerShim(this);
     builderEnv.UseMiddlewareBuilder(_OldServerShim.AppFuncBuilder);
 }
        private void UseCorsHandler(IPipelineBuilderEnvironment builderEnv)
        {
            var handler = Factory.Resolve <ICorsHandler>();

            builderEnv.UseMiddlewareBuilder(handler.AppFuncBuilder);
        }
        private void UseRedirectionFilter(IPipelineBuilderEnvironment builderEnv)
        {
            var filter = Factory.Resolve <IRedirectionFilter>();

            builderEnv.UseMiddlewareBuilder(filter.AppFuncBuilder);
        }
        private void UseBasicAuthenticationFilter(IPipelineBuilderEnvironment builderEnv)
        {
            var filter = Factory.Resolve <IBasicAuthenticationFilter>();

            builderEnv.UseMiddlewareBuilder(filter.AppFuncBuilder);
        }
        private void UseAudioServer(IPipelineBuilderEnvironment builderEnv)
        {
            var server = Factory.Resolve <IAudioServer>();

            builderEnv.UseMiddlewareBuilder(server.AppFuncBuilder);
        }
Exemple #9
0
 public void UseMiddlewareBuilder_Throws_If_Passed_Null()
 {
     _Environment.UseMiddlewareBuilder(null);
 }