More setup
This commit is contained in:
parent
a804a53f8c
commit
dc8fed53f9
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,11 +1,9 @@
|
|||||||
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.Filters
|
namespace Microsoft.eShopOnContainers.Services.TenantACustomisations.Infrastructure.Filters
|
||||||
{
|
{
|
||||||
using AspNetCore.Mvc;
|
using AspNetCore.Mvc;
|
||||||
using global::Ordering.Domain.Exceptions;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
using Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.ActionResults;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
||||||
@ -26,7 +24,7 @@
|
|||||||
context.Exception,
|
context.Exception,
|
||||||
context.Exception.Message);
|
context.Exception.Message);
|
||||||
|
|
||||||
if (context.Exception.GetType() == typeof(OrderingDomainException))
|
if (1==2)//TODO
|
||||||
{
|
{
|
||||||
var problemDetails = new ValidationProblemDetails()
|
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
|
// 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
|
// 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.HttpContext.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
|
||||||
}
|
}
|
||||||
context.ExceptionHandled = true;
|
context.ExceptionHandled = true;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Microsoft.eShopOnContainers.Services.Ordering.API
|
namespace Microsoft.eShopOnContainers.Services.TenantACustomisations
|
||||||
{
|
{
|
||||||
using AspNetCore.Http;
|
using AspNetCore.Http;
|
||||||
using Autofac;
|
using Autofac;
|
||||||
@ -30,7 +30,9 @@
|
|||||||
using HealthChecks.UI.Client;
|
using HealthChecks.UI.Client;
|
||||||
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||||
using Microsoft.Extensions.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
|
public class Startup
|
||||||
{
|
{
|
||||||
@ -117,7 +119,8 @@
|
|||||||
{
|
{
|
||||||
if (Configuration.GetValue<bool>("UseLoadTest"))
|
if (Configuration.GetValue<bool>("UseLoadTest"))
|
||||||
{
|
{
|
||||||
app.UseMiddleware<ByPassAuthMiddleware>();
|
//app.UseMiddleware<ByPassAuthMiddleware>();
|
||||||
|
//TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
|
@ -48,10 +48,10 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\eShopOnContainersCustomised\src\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" />
|
<ProjectReference Include="..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" />
|
||||||
<ProjectReference Include="..\eShopOnContainersCustomised\src\BuildingBlocks\EventBus\EventBusServiceBus\EventBusServiceBus.csproj" />
|
<ProjectReference Include="..\..\BuildingBlocks\EventBus\EventBusServiceBus\EventBusServiceBus.csproj" />
|
||||||
<ProjectReference Include="..\eShopOnContainersCustomised\src\BuildingBlocks\EventBus\EventBus\EventBus.csproj" />
|
<ProjectReference Include="..\..\BuildingBlocks\EventBus\EventBus\EventBus.csproj" />
|
||||||
<ProjectReference Include="..\eShopOnContainersCustomised\src\BuildingBlocks\EventBus\IntegrationEventLogEF\IntegrationEventLogEF.csproj" />
|
<ProjectReference Include="..\..\BuildingBlocks\EventBus\IntegrationEventLogEF\IntegrationEventLogEF.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user