More setup

This commit is contained in:
espent1004 2019-10-27 22:52:18 +01:00
parent a804a53f8c
commit dc8fed53f9
5 changed files with 50 additions and 12 deletions

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -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;

View File

@ -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<bool>("UseLoadTest"))
{
app.UseMiddleware<ByPassAuthMiddleware>();
//app.UseMiddleware<ByPassAuthMiddleware>();
//TODO
}
app.UseAuthentication();

View File

@ -48,10 +48,10 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\eShopOnContainersCustomised\src\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" />
<ProjectReference Include="..\eShopOnContainersCustomised\src\BuildingBlocks\EventBus\EventBusServiceBus\EventBusServiceBus.csproj" />
<ProjectReference Include="..\eShopOnContainersCustomised\src\BuildingBlocks\EventBus\EventBus\EventBus.csproj" />
<ProjectReference Include="..\eShopOnContainersCustomised\src\BuildingBlocks\EventBus\IntegrationEventLogEF\IntegrationEventLogEF.csproj" />
<ProjectReference Include="..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" />
<ProjectReference Include="..\..\BuildingBlocks\EventBus\EventBusServiceBus\EventBusServiceBus.csproj" />
<ProjectReference Include="..\..\BuildingBlocks\EventBus\EventBus\EventBus.csproj" />
<ProjectReference Include="..\..\BuildingBlocks\EventBus\IntegrationEventLogEF\IntegrationEventLogEF.csproj" />
</ItemGroup>
<ItemGroup>