Exemplo n.º 1
0
 public IntegratedPipelineBlueprint(
     OwinAppContext appContext,
     IntegratedPipelineBlueprintStage firstStage,
     string pathBase)
 {
     _appContext = appContext;
     _firstStage = firstStage;
     _pathBase   = pathBase;
 }
Exemplo n.º 2
0
 public AspNetEnvironmentTests()
 {
     var appContext = new OwinAppContext();
     appContext.Initialize(_ => { });
     var requestContext = new RequestContext(new FakeHttpContextEx(), new RouteData());
     OwinCallContext callContext = appContext.CreateCallContext(requestContext, string.Empty, string.Empty, null, null);
     callContext.Execute();
     _env = _aspNetDictionary = callContext.Environment;
 }
Exemplo n.º 3
0
 public IntegratedPipelineBlueprint(
     OwinAppContext appContext,
     IntegratedPipelineBlueprintStage firstStage,
     string pathBase)
 {
     _appContext = appContext;
     _firstStage = firstStage;
     _pathBase = pathBase;
 }
Exemplo n.º 4
0
        public AspNetEnvironmentTests()
        {
            var appContext = new OwinAppContext();

            appContext.Initialize(_ => { });
            var             requestContext = new RequestContext(new FakeHttpContextEx(), new RouteData());
            OwinCallContext callContext    = appContext.CreateCallContext(requestContext, string.Empty, string.Empty, null, null);

            callContext.Execute();
            _env = _aspNetDictionary = callContext.Environment;
        }
Exemplo n.º 5
0
        /// <summary>
        /// Registers a route for a specific OWIN application entry point.
        /// </summary>
        /// <typeparam name="TApp">The OWIN application entry point type.</typeparam>
        /// <param name="routes">The route collection.</param>
        /// <param name="name">The given name of the route.</param>
        /// <param name="pathBase">The route path to map to the given OWIN application.</param>
        /// <param name="app">The OWIN application entry point.</param>
        /// <returns>The created route.</returns>
        public static RouteBase MapOwinPath <TApp>(this RouteCollection routes, string name, string pathBase, TApp app)
        {
            if (app == null)
            {
                throw new ArgumentNullException("app");
            }

            OwinAppContext appDelegate = OwinBuilder.Build(builder => builder.Use(new Func <object, object>(_ => app)));

            return(Add(routes, name, new OwinRoute(pathBase, () => appDelegate)));
        }
Exemplo n.º 6
0
        /// <summary>
        /// Registers a route for a specific OWIN application entry point.
        /// </summary>
        /// <typeparam name="TApp">The OWIN application entry point type.</typeparam>
        /// <param name="routes">The route collection.</param>
        /// <param name="name">The given name of the route.</param>
        /// <param name="pathBase">The route path to map to the given OWIN application.</param>
        /// <param name="app">The OWIN application entry point.</param>
        /// <returns>The created route.</returns>
        public static RouteBase MapOwinPath <TApp>(this RouteCollection routes, string name, string pathBase, TApp app)
        {
            OwinAppContext appDelegate = OwinBuilder.Build(builder => builder.Use(new Func <object, object>(_ => app)));

            return(Add(routes, name, new OwinRoute(pathBase, () => appDelegate)));
        }
Exemplo n.º 7
0
        /// <summary>
        /// Invokes the System.Action startup delegate to build the OWIN application
        /// and then registers a route for it on the given path.
        /// </summary>
        /// <param name="routes">The route collection.</param>
        /// <param name="pathBase">The route path to map to the given OWIN application.</param>
        /// <param name="startup">A System.Action delegate invoked to build the OWIN application.</param>
        /// <returns>The created route.</returns>
        public static RouteBase MapOwinPath(this RouteCollection routes, string pathBase, Action <IAppBuilder> startup)
        {
            OwinAppContext appDelegate = OwinBuilder.Build(startup);

            return(Add(routes, null, new OwinRoute(pathBase, () => appDelegate)));
        }