Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// <auto-generated/>
#pragma warning disable
using Microsoft.AspNetCore.Routing;
using System;
using System.Linq;
using Wolverine.Http;
using Wolverine.Runtime;

namespace Internal.Generated.WolverineHandlers
{
// START: GET_maybe
[global::System.CodeDom.Compiler.GeneratedCode("JasperFx", "1.0.0")]
public sealed class GET_maybe : Wolverine.Http.HttpHandler
{
private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;

public GET_maybe(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
{
_wolverineHttpOptions = wolverineHttpOptions;
_wolverineRuntime = wolverineRuntime;
}



public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
{

// Tenant Id detection
// 1. Tenant Id is query string value 'tenant'
var tenantId = await TryDetectTenantId(httpContext);
var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
messageContext.TenantId = tenantId;
Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);

// The actual HTTP request handler execution
var result_of_MaybeTenanted = Wolverine.Http.Tests.MultiTenancy.TenantedEndpoints.MaybeTenanted(messageContext);

await WriteString(httpContext, result_of_MaybeTenanted);

// Have to flush outgoing messages just in case Marten did nothing because of https://github.com/JasperFx/wolverine/issues/536
await messageContext.FlushOutgoingMessagesAsync().ConfigureAwait(false);

}

}

// END: GET_maybe


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// <auto-generated/>
#pragma warning disable
using Microsoft.AspNetCore.Routing;
using System;
using System.Linq;
using Wolverine.Http;

namespace Internal.Generated.WolverineHandlers
{
// START: GET_nottenanted
[global::System.CodeDom.Compiler.GeneratedCode("JasperFx", "1.0.0")]
public sealed class GET_nottenanted : Wolverine.Http.HttpHandler
{
private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;

public GET_nottenanted(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
{
_wolverineHttpOptions = wolverineHttpOptions;
}



public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
{

// The actual HTTP request handler execution
var result_of_NoTenantNoProblem = Wolverine.Http.Tests.MultiTenancy.TenantedEndpoints.NoTenantNoProblem();

await WriteString(httpContext, result_of_NoTenantNoProblem);
}

}

// END: GET_nottenanted


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// <auto-generated/>
#pragma warning disable
using Microsoft.AspNetCore.Routing;
using System;
using System.Linq;
using Wolverine.Http;
using Wolverine.Runtime;

namespace Internal.Generated.WolverineHandlers
{
// START: GET_tenant
[global::System.CodeDom.Compiler.GeneratedCode("JasperFx", "1.0.0")]
public sealed class GET_tenant : Wolverine.Http.HttpHandler
{
private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;

public GET_tenant(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
{
_wolverineHttpOptions = wolverineHttpOptions;
_wolverineRuntime = wolverineRuntime;
}



public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
{

// Tenant Id detection
// 1. Tenant Id is request header 'tenant'
var tenantId = await TryDetectTenantId(httpContext);
var tenantIdentifier = new JasperFx.MultiTenancy.TenantId(tenantId);
var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
messageContext.TenantId = tenantId;
Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);

// The actual HTTP request handler execution
var result_of_GetTenantIdFromWhatever = Wolverine.Http.Tests.MultiTenancy.TenantedEndpoints.GetTenantIdFromWhatever(messageContext, httpContext, tenantIdentifier);

await WriteString(httpContext, result_of_GetTenantIdFromWhatever);

// Have to flush outgoing messages just in case Marten did nothing because of https://github.com/JasperFx/wolverine/issues/536
await messageContext.FlushOutgoingMessagesAsync().ConfigureAwait(false);

}

}

// END: GET_tenant


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// <auto-generated/>
#pragma warning disable
using Microsoft.AspNetCore.Routing;
using System;
using System.Linq;
using Wolverine.Http;
using Wolverine.Runtime;

namespace Internal.Generated.WolverineHandlers
{
// START: GET_tenant_both_tenant
[global::System.CodeDom.Compiler.GeneratedCode("JasperFx", "1.0.0")]
public sealed class GET_tenant_both_tenant : Wolverine.Http.HttpHandler
{
private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;

public GET_tenant_both_tenant(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
{
_wolverineHttpOptions = wolverineHttpOptions;
_wolverineRuntime = wolverineRuntime;
}



public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
{

// Tenant Id detection
// 1. Tenant Id is route argument named 'tenant'
var tenantId = await TryDetectTenantId(httpContext);
if (string.IsNullOrEmpty(tenantId))
{
await WriteTenantIdNotFound(httpContext);
return;
}

var tenantIdentifier = new JasperFx.MultiTenancy.TenantId(tenantId);
var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
messageContext.TenantId = tenantId;
Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);

// The actual HTTP request handler execution
var result_of_GetTenantWithArgs1 = Wolverine.Http.Tests.MultiTenancy.TenantedEndpoints.GetTenantWithArgs1(messageContext, messageContext, tenantIdentifier);

await WriteString(httpContext, result_of_GetTenantWithArgs1);

// Have to flush outgoing messages just in case Marten did nothing because of https://github.com/JasperFx/wolverine/issues/536
await messageContext.FlushOutgoingMessagesAsync().ConfigureAwait(false);

}

}

// END: GET_tenant_both_tenant


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// <auto-generated/>
#pragma warning disable
using Microsoft.AspNetCore.Routing;
using System;
using System.Linq;
using Wolverine.Http;
using Wolverine.Runtime;

namespace Internal.Generated.WolverineHandlers
{
// START: GET_tenant_bus_tenant
[global::System.CodeDom.Compiler.GeneratedCode("JasperFx", "1.0.0")]
public sealed class GET_tenant_bus_tenant : Wolverine.Http.HttpHandler
{
private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;

public GET_tenant_bus_tenant(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
{
_wolverineHttpOptions = wolverineHttpOptions;
_wolverineRuntime = wolverineRuntime;
}



public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
{

// Tenant Id detection
// 1. Tenant Id is route argument named 'tenant'
var tenantId = await TryDetectTenantId(httpContext);
if (string.IsNullOrEmpty(tenantId))
{
await WriteTenantIdNotFound(httpContext);
return;
}

var tenantIdentifier = new JasperFx.MultiTenancy.TenantId(tenantId);
var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
messageContext.TenantId = tenantId;
Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);

// The actual HTTP request handler execution
var result_of_GetTenantWithArgs1 = Wolverine.Http.Tests.MultiTenancy.TenantedEndpoints.GetTenantWithArgs1(messageContext, tenantIdentifier);

await WriteString(httpContext, result_of_GetTenantWithArgs1);

// Have to flush outgoing messages just in case Marten did nothing because of https://github.com/JasperFx/wolverine/issues/536
await messageContext.FlushOutgoingMessagesAsync().ConfigureAwait(false);

}

}

// END: GET_tenant_bus_tenant


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// <auto-generated/>
#pragma warning disable
using Microsoft.AspNetCore.Routing;
using System;
using System.Linq;
using Wolverine.Http;
using Wolverine.Runtime;

namespace Internal.Generated.WolverineHandlers
{
// START: GET_tenant_context_tenant
[global::System.CodeDom.Compiler.GeneratedCode("JasperFx", "1.0.0")]
public sealed class GET_tenant_context_tenant : Wolverine.Http.HttpHandler
{
private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;

public GET_tenant_context_tenant(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
{
_wolverineHttpOptions = wolverineHttpOptions;
_wolverineRuntime = wolverineRuntime;
}



public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
{

// Tenant Id detection
// 1. Tenant Id is route argument named 'tenant'
var tenantId = await TryDetectTenantId(httpContext);
if (string.IsNullOrEmpty(tenantId))
{
await WriteTenantIdNotFound(httpContext);
return;
}

var tenantIdentifier = new JasperFx.MultiTenancy.TenantId(tenantId);
var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
messageContext.TenantId = tenantId;
Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);

// The actual HTTP request handler execution
var result_of_GetTenantWithArgs1 = Wolverine.Http.Tests.MultiTenancy.TenantedEndpoints.GetTenantWithArgs1(messageContext, tenantIdentifier);

await WriteString(httpContext, result_of_GetTenantWithArgs1);

// Have to flush outgoing messages just in case Marten did nothing because of https://github.com/JasperFx/wolverine/issues/536
await messageContext.FlushOutgoingMessagesAsync().ConfigureAwait(false);

}

}

// END: GET_tenant_context_tenant


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// <auto-generated/>
#pragma warning disable
using Microsoft.AspNetCore.Routing;
using System;
using System.Linq;
using Wolverine.Http;
using Wolverine.Runtime;

namespace Internal.Generated.WolverineHandlers
{
// START: GET_tenant_route_tenant
[global::System.CodeDom.Compiler.GeneratedCode("JasperFx", "1.0.0")]
public sealed class GET_tenant_route_tenant : Wolverine.Http.HttpHandler
{
private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;

public GET_tenant_route_tenant(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
{
_wolverineHttpOptions = wolverineHttpOptions;
_wolverineRuntime = wolverineRuntime;
}



public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
{

// Tenant Id detection
// 1. Tenant Id is query string value 't'
// 2. Wolverine.Http.Runtime.MultiTenancy.FallbackDefault
var tenantId = await TryDetectTenantId(httpContext);
var tenantIdentifier = new JasperFx.MultiTenancy.TenantId(tenantId);
var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
messageContext.TenantId = tenantId;
Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);

// The actual HTTP request handler execution
var result_of_GetTenantIdFromRoute = Wolverine.Http.Tests.MultiTenancy.TenantedEndpoints.GetTenantIdFromRoute(messageContext, tenantIdentifier);

await WriteString(httpContext, result_of_GetTenantIdFromRoute);

// Have to flush outgoing messages just in case Marten did nothing because of https://github.com/JasperFx/wolverine/issues/536
await messageContext.FlushOutgoingMessagesAsync().ConfigureAwait(false);

}

}

// END: GET_tenant_route_tenant


}

Loading
Loading