Beispiel #1
0
        public void Configure(
            IApplicationBuilder app,
            IHostEnvironment env,
            IPageConfiguration pageConfiguration,
            ILanguageManipulationService languageManipulationService,
            IEndpointsBuilder endpointsBuilder)
        {
            app.UseStatusCodePagesWithReExecute("/errors/{0}");

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseStaticFiles();

            var defaultCulture = languageManipulationService
                                 .LanguageDefinitionToCultureInfo(
                pageConfiguration.DefaultLanguage
                );

            app.UseRequestLocalization(new RequestLocalizationOptions
            {
                SupportedCultures       = languageManipulationService.SupportedCultures,
                SupportedUICultures     = languageManipulationService.SupportedCultures,
                RequestCultureProviders = new IRequestCultureProvider[] { new CustomUrlStringCultureProvider(languageManipulationService) },
                DefaultRequestCulture   = new RequestCulture(defaultCulture, defaultCulture)
            }
                                       );

            app.UseRouting();
            app.UseAuthentication();
            app.UseAuthorization();
            app.UseEndpoints(endpointsBuilder.Build);
        }
 public DispatcherEndpointsBuilder(IEndpointsBuilder builder)
 {
     _builder = builder;
 }
Beispiel #3
0
 public EndpointBuilderIntegrationTests()
 {
     _endpointsBuilder = A.Fake <IEndpointsBuilder>();
     _systemUnderTest  = new MediatREndpointWithDtoBuilder(_endpointsBuilder);
 }
Beispiel #4
0
 public static IDispatcherEndpointsBuilder Dispatch(this IEndpointsBuilder endpoints,
                                                    Func <IDispatcherEndpointsBuilder, IDispatcherEndpointsBuilder> builder)
 => builder(new DispatcherEndpointsBuilder(endpoints));
 public MediatREndpointWithDtoBuilder(IEndpointsBuilder builder)
 {
     _builder = builder;
 }
 public ExtendedDispatcherEndpointsBuilder(IEndpointsBuilder builder) : base(builder)
 {
     _builder = builder;
 }
 public MediatrEndpointsBuilderTests()
 {
     _endpointsBuilder = A.Fake <IEndpointsBuilder>();
     _systemUnderTest  = new MediatrEndpointsBuilder(_endpointsBuilder);
 }
Beispiel #8
0
 public MediatrEndpointsBuilder(IEndpointsBuilder endpointsBuilder)
 {
     _builder = endpointsBuilder;
 }