Beispiel #1
0
        protected virtual ConfigurableBootstrapper.ConfigurableBootstrapperConfigurator ConfigureBootstrapper(ConfigurableBootstrapper configurableBootstrapper, params Claim[] claims)
        {
            var configurableBootstrapperConfigurator = new ConfigurableBootstrapper.ConfigurableBootstrapperConfigurator(configurableBootstrapper);

            configurableBootstrapperConfigurator.Module <T>();
            configurableBootstrapperConfigurator.RequestStartup((container, pipeline, context) =>
            {
                context.CurrentUser = new TestPrincipal(claims);
            });
            return(configurableBootstrapperConfigurator);
        }
        protected virtual ConfigurableBootstrapper.ConfigurableBootstrapperConfigurator ConfigureBootstrapper(
            ConfigurableBootstrapper configurableBootstrapper, params Claim[] claims)
        {
            var configurableBootstrapperConfigurator =
                new ConfigurableBootstrapper.ConfigurableBootstrapperConfigurator(configurableBootstrapper);

            configurableBootstrapperConfigurator.Module <T>();
            configurableBootstrapperConfigurator.RequestStartup((container, pipeline, context) =>
            {
                context.CurrentUser     = new TestPrincipal(claims);
                pipeline.BeforeRequest += ctx => RequestHooks.SetDefaultVersionInUrl(ctx);
            });
            return(configurableBootstrapperConfigurator);
        }