diff --git a/src/Services/TenantACustomisations/Infrastructure/AutofacModules/ApplicationModule.cs b/src/Services/TenantACustomisations/Infrastructure/AutofacModules/ApplicationModule.cs new file mode 100644 index 000000000..69cc1d12a --- /dev/null +++ b/src/Services/TenantACustomisations/Infrastructure/AutofacModules/ApplicationModule.cs @@ -0,0 +1,24 @@ +using Autofac; +using System.Reflection; + +namespace Microsoft.eShopOnContainers.Services.TenantACustomisations.Infrastructure.AutofacModules +{ + + public class ApplicationModule + :Autofac.Module + { + + public string QueriesConnectionString { get; } + + public ApplicationModule(string qconstr) + { + QueriesConnectionString = qconstr; + + } + + protected override void Load(ContainerBuilder builder) + { + //TODO + } + } +} diff --git a/src/Services/TenantACustomisations/Infrastructure/AutofacModules/MediatorModule.cs b/src/Services/TenantACustomisations/Infrastructure/AutofacModules/MediatorModule.cs new file mode 100644 index 000000000..bfcdb42b3 --- /dev/null +++ b/src/Services/TenantACustomisations/Infrastructure/AutofacModules/MediatorModule.cs @@ -0,0 +1,12 @@ +using Autofac; + +namespace Microsoft.eShopOnContainers.Services.TenantACustomisations.Infrastructure.AutofacModules +{ + public class MediatorModule : Autofac.Module + { + protected override void Load(ContainerBuilder builder) + { + //TODO + } + } +} diff --git a/src/Services/TenantACustomisations/Infrastructure/Filters/HttpGlobalExceptionFilter.cs b/src/Services/TenantACustomisations/Infrastructure/Filters/HttpGlobalExceptionFilter.cs index a4ce415ea..0fb959a65 100644 --- a/src/Services/TenantACustomisations/Infrastructure/Filters/HttpGlobalExceptionFilter.cs +++ b/src/Services/TenantACustomisations/Infrastructure/Filters/HttpGlobalExceptionFilter.cs @@ -1,11 +1,9 @@ -namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.Filters +namespace Microsoft.eShopOnContainers.Services.TenantACustomisations.Infrastructure.Filters { using AspNetCore.Mvc; - using global::Ordering.Domain.Exceptions; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Filters; - using Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.ActionResults; using Microsoft.Extensions.Logging; using System.Net; @@ -26,7 +24,7 @@ context.Exception, context.Exception.Message); - if (context.Exception.GetType() == typeof(OrderingDomainException)) + if (1==2)//TODO { var problemDetails = new ValidationProblemDetails() { @@ -54,7 +52,8 @@ // Result asigned to a result object but in destiny the response is empty. This is a known bug of .net core 1.1 // It will be fixed in .net core 1.1.2. See https://github.com/aspnet/Mvc/issues/5594 for more information - context.Result = new InternalServerErrorObjectResult(json); + //TODO + //context.Result = new InternalServerErrorObjectResult(json); context.HttpContext.Response.StatusCode = (int)HttpStatusCode.InternalServerError; } context.ExceptionHandled = true; diff --git a/src/Services/TenantACustomisations/Startup.cs b/src/Services/TenantACustomisations/Startup.cs index 69538d9c1..afdb96f30 100644 --- a/src/Services/TenantACustomisations/Startup.cs +++ b/src/Services/TenantACustomisations/Startup.cs @@ -1,4 +1,4 @@ -namespace Microsoft.eShopOnContainers.Services.Ordering.API +namespace Microsoft.eShopOnContainers.Services.TenantACustomisations { using AspNetCore.Http; using Autofac; @@ -30,7 +30,9 @@ using HealthChecks.UI.Client; using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.Extensions.Diagnostics.HealthChecks; - using TenantACustomisations.Infrastructure.Filters; + using Infrastructure.AutofacModules; + using Microsoft.eShopOnContainers.Services.TenantACustomisations.Infrastructure.Filters; + using global::TenantACustomisations.Infrastructure.Filters; public class Startup { @@ -117,7 +119,8 @@ { if (Configuration.GetValue("UseLoadTest")) { - app.UseMiddleware(); + //app.UseMiddleware(); + //TODO } app.UseAuthentication(); diff --git a/src/Services/TenantACustomisations/TenantACustomisations.csproj b/src/Services/TenantACustomisations/TenantACustomisations.csproj index 1e6b1036b..606018fed 100644 --- a/src/Services/TenantACustomisations/TenantACustomisations.csproj +++ b/src/Services/TenantACustomisations/TenantACustomisations.csproj @@ -48,10 +48,10 @@ - - - - + + + +