diff --git a/src/Http/Wolverine.Http.Tests/Internal/Generated/WolverineHandlers/POST_api_tenants_tenant_counters_id_inc.cs b/src/Http/Wolverine.Http.Tests/Internal/Generated/WolverineHandlers/POST_api_tenants_tenant_counters_id_inc.cs
deleted file mode 100644
index e3f15706c..000000000
--- a/src/Http/Wolverine.Http.Tests/Internal/Generated/WolverineHandlers/POST_api_tenants_tenant_counters_id_inc.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_tenants_tenant_counters_id_inc
- public class POST_api_tenants_tenant_counters_id_inc : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_api_tenants_tenant_counters_id_inc(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("id"), out var id))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- var counter = await documentSession.LoadAsync(id, httpContext.RequestAborted).ConfigureAwait(false);
- // 404 if this required object is null
- if (counter == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- (var result, var martenOp) = Wolverine.Http.Tests.Bugs.CounterEndpoint.Increment(counter);
-
- if (martenOp != null)
- {
-
- // Placed by Wolverine's ISideEffect policy
- martenOp.Execute(documentSession);
-
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- await result.ExecuteAsync(httpContext).ConfigureAwait(false);
- }
-
- }
-
- // END: POST_api_tenants_tenant_counters_id_inc
-
-
-}
-
diff --git a/src/Http/Wolverine.Http.Tests/Internal/Generated/WolverineHandlers/POST_api_tenants_tenant_counters_id_inc2.cs b/src/Http/Wolverine.Http.Tests/Internal/Generated/WolverineHandlers/POST_api_tenants_tenant_counters_id_inc2.cs
deleted file mode 100644
index 196a83f25..000000000
--- a/src/Http/Wolverine.Http.Tests/Internal/Generated/WolverineHandlers/POST_api_tenants_tenant_counters_id_inc2.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_tenants_tenant_counters_id_inc2
- public class POST_api_tenants_tenant_counters_id_inc2 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_api_tenants_tenant_counters_id_inc2(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("id"), out var id))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- var counter = await documentSession.LoadAsync(id, httpContext.RequestAborted).ConfigureAwait(false);
- // 404 if this required object is null
- if (counter == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- var martenOp = Wolverine.Http.Tests.Bugs.CounterEndpoint.Increment2(counter);
-
- if (martenOp != null)
- {
-
- // Placed by Wolverine's ISideEffect policy
- martenOp.Execute(documentSession);
-
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_api_tenants_tenant_counters_id_inc2
-
-
-}
-
diff --git a/src/Http/Wolverine.Http.Tests/Wolverine.Http.Tests.csproj b/src/Http/Wolverine.Http.Tests/Wolverine.Http.Tests.csproj
index b485aaaf4..1c3a7753f 100644
--- a/src/Http/Wolverine.Http.Tests/Wolverine.Http.Tests.csproj
+++ b/src/Http/Wolverine.Http.Tests/Wolverine.Http.Tests.csproj
@@ -34,6 +34,7 @@
+
diff --git a/src/Http/Wolverine.Http.Tests/building_a_saga_and_publishing_other_messages_from_http_endpoint.cs b/src/Http/Wolverine.Http.Tests/building_a_saga_and_publishing_other_messages_from_http_endpoint.cs
index d547ffaf4..5cb4eb34c 100644
--- a/src/Http/Wolverine.Http.Tests/building_a_saga_and_publishing_other_messages_from_http_endpoint.cs
+++ b/src/Http/Wolverine.Http.Tests/building_a_saga_and_publishing_other_messages_from_http_endpoint.cs
@@ -1,4 +1,6 @@
+using Alba;
using Shouldly;
+using Wolverine.Tracking;
using WolverineWebApi;
namespace Wolverine.Http.Tests;
@@ -12,14 +14,24 @@ public building_a_saga_and_publishing_other_messages_from_http_endpoint(AppFixtu
[Fact]
public async Task can_create_saga_and_publish_message()
{
+ await Host.GetRuntime().Storage.Admin.ClearAllAsync();
await Store.Advanced.Clean.DeleteDocumentsByTypeAsync(typeof(Reservation));
- var (tracked, result) = await TrackedHttpCall(x =>
- {
- x.Post.Json(new StartReservation("dinner")).ToUrl("/reservation");
- });
+ IScenarioResult result = null!;
- tracked.Sent.SingleMessage().ShouldNotBeNull();
+ Func action = async _ =>
+ {
+ result = await Host.Scenario(x =>
+ {
+ x.Post.Json(new StartReservation("dinner")).ToUrl("/reservation");
+ });
+ };
+
+ // The outer part is tying into Wolverine's test support
+ // to "wait" for all detected message activity to complete
+ await Host
+ .TrackActivity()
+ .ExecuteAndWaitAsync(action);
using var session = Store.LightweightSession();
var reservation = await session.LoadAsync("dinner");
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/AfterMessage1Handler533023927.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/AfterMessage1Handler533023927.cs
deleted file mode 100644
index ba9609b4e..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/AfterMessage1Handler533023927.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-#pragma warning disable
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: AfterMessage1Handler533023927
- public class AfterMessage1Handler533023927 : Wolverine.Runtime.Handlers.MessageHandler
- {
-
-
- public override System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // The actual message body
- var afterMessage1 = (WolverineWebApi.AfterMessage1)context.Envelope.Message;
-
-
- // The actual message execution
- WolverineWebApi.MiddlewareMessageHandler.Handle(afterMessage1);
-
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: AfterMessage1Handler533023927
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/BeforeMessage1Handler784498762.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/BeforeMessage1Handler784498762.cs
deleted file mode 100644
index 8cdd4e825..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/BeforeMessage1Handler784498762.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-#pragma warning disable
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: BeforeMessage1Handler784498762
- public class BeforeMessage1Handler784498762 : Wolverine.Runtime.Handlers.MessageHandler
- {
-
-
- public override System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // The actual message body
- var beforeMessage1 = (WolverineWebApi.BeforeMessage1)context.Envelope.Message;
-
-
- // The actual message execution
- WolverineWebApi.MiddlewareMessageHandler.Handle(beforeMessage1);
-
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: BeforeMessage1Handler784498762
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/CreateTodoRequestHandler482446425.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/CreateTodoRequestHandler482446425.cs
deleted file mode 100644
index 24446493b..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/CreateTodoRequestHandler482446425.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-#pragma warning disable
-using Wolverine.Marten.Publishing;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: CreateTodoRequestHandler482446425
- public class CreateTodoRequestHandler482446425 : Wolverine.Runtime.Handlers.MessageHandler
- {
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public CreateTodoRequestHandler482446425(Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory)
- {
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(context);
- // The actual message body
- var createTodoRequest = (WolverineWebApi.Todos.CreateTodoRequest)context.Envelope.Message;
-
-
- // The actual message execution
- var outgoing1 = WolverineWebApi.Todos.TodoHandler.Handle(createTodoRequest);
-
- if (outgoing1 != null)
- {
-
- // Register the document operation with the current session
- documentSession.Insert(outgoing1.Entity);
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(cancellation).ConfigureAwait(false);
-
-
- // Have to flush outgoing messages just in case Marten did nothing because of https://github.com/JasperFx/wolverine/issues/536
- await context.FlushOutgoingMessagesAsync().ConfigureAwait(false);
-
- }
-
- }
-
- // END: CreateTodoRequestHandler482446425
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/CustomRequestHandler1116913013.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/CustomRequestHandler1116913013.cs
deleted file mode 100644
index 8e8595a12..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/CustomRequestHandler1116913013.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-#pragma warning disable
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: CustomRequestHandler1116913013
- public class CustomRequestHandler1116913013 : Wolverine.Runtime.Handlers.MessageHandler
- {
-
-
- public override async System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // The actual message body
- var customRequest = (WolverineWebApi.CustomRequest)context.Envelope.Message;
-
-
- // The actual message execution
- var outgoing1 = WolverineWebApi.MessageHandler.Handle(customRequest);
-
-
- // Outgoing, cascaded message
- await context.EnqueueCascadingAsync(outgoing1).ConfigureAwait(false);
-
- }
-
- }
-
- // END: CustomRequestHandler1116913013
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/DELETE_api_trainer.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/DELETE_api_trainer.cs
deleted file mode 100644
index af6c46a2a..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/DELETE_api_trainer.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: DELETE_api_trainer
- public class DELETE_api_trainer : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public DELETE_api_trainer(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- var userId = WolverineWebApi.UserIdMiddleware.LoadAsync(httpContext);
- var trainerDelete = new WolverineWebApi.TrainerDelete();
-
- // The actual HTTP request handler execution
- var result = await trainerDelete.Delete(userId, documentSession, httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- await result.ExecuteAsync(httpContext).ConfigureAwait(false);
- }
-
- }
-
- // END: DELETE_api_trainer
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/DELETE_optional_result.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/DELETE_optional_result.cs
deleted file mode 100644
index a18548e9a..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/DELETE_optional_result.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: DELETE_optional_result
- public class DELETE_optional_result : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public DELETE_optional_result(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- // Reading the request body via JSON deserialization
- var (cmd, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var user = WolverineWebApi.Validation.ValidatedCompoundEndpoint2.Load(cmd);
- var result1 = WolverineWebApi.Validation.ValidatedCompoundEndpoint2.Validate(user);
- // Evaluate whether or not the execution should be stopped based on the IResult value
- if (result1 != null && !(result1 is Wolverine.Http.WolverineContinue))
- {
- await result1.ExecuteAsync(httpContext).ConfigureAwait(false);
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- var result_of_Handle = WolverineWebApi.Validation.ValidatedCompoundEndpoint2.Handle(cmd, user);
-
- await WriteString(httpContext, result_of_Handle);
- }
-
- }
-
- // END: DELETE_optional_result
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/DELETE_validate_user_compound.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/DELETE_validate_user_compound.cs
deleted file mode 100644
index 629e6b516..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/DELETE_validate_user_compound.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-#pragma warning disable
-using FluentValidation;
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Http.FluentValidation;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: DELETE_validate_user_compound
- public class DELETE_validate_user_compound : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Http.FluentValidation.IProblemDetailSource _problemDetailSource;
- private readonly FluentValidation.IValidator _validator;
-
- public DELETE_validate_user_compound(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Http.FluentValidation.IProblemDetailSource problemDetailSource, FluentValidation.IValidator validator) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _problemDetailSource = problemDetailSource;
- _validator = validator;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- // Reading the request body via JSON deserialization
- var (cmd, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // Execute FluentValidation validators
- var result1 = await Wolverine.Http.FluentValidation.Internals.FluentValidationHttpExecutor.ExecuteOne(_validator, _problemDetailSource, cmd).ConfigureAwait(false);
-
- // Evaluate whether or not the execution should be stopped based on the IResult value
- if (result1 != null && !(result1 is Wolverine.Http.WolverineContinue))
- {
- await result1.ExecuteAsync(httpContext).ConfigureAwait(false);
- return;
- }
-
-
- var user = WolverineWebApi.Validation.ValidatedCompoundEndpoint.Load(cmd);
- var result2 = WolverineWebApi.Validation.ValidatedCompoundEndpoint.Validate(user);
- // Evaluate whether or not the execution should be stopped based on the IResult value
- if (result2 != null && !(result2 is Wolverine.Http.WolverineContinue))
- {
- await result2.ExecuteAsync(httpContext).ConfigureAwait(false);
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- var result_of_Handle = WolverineWebApi.Validation.ValidatedCompoundEndpoint.Handle(cmd, user);
-
- await WriteString(httpContext, result_of_Handle);
- }
-
- }
-
- // END: DELETE_validate_user_compound
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/DataHandler620835457.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/DataHandler620835457.cs
deleted file mode 100644
index 9e0e701de..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/DataHandler620835457.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-#pragma warning disable
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: DataHandler620835457
- public class DataHandler620835457 : Wolverine.Runtime.Handlers.MessageHandler
- {
-
-
- public override System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // The actual message body
- var data = (WolverineWebApi.Data)context.Envelope.Message;
-
- var dataHandler = new WolverineWebApi.DataHandler();
-
- // The actual message execution
- dataHandler.Handle(data);
-
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: DataHandler620835457
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_age_age.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_age_age.cs
deleted file mode 100644
index 0d0d849db..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_age_age.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_age_age
- public class GET_age_age : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_age_age(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- if (!int.TryParse((string)httpContext.GetRouteValue("age"), out var age))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // Just saying hello in the code! Also testing the usage of attributes to customize endpoints
-
- // The actual HTTP request handler execution
- var result_of_IntRouteArgument = WolverineWebApi.TestEndpoints.IntRouteArgument(age);
-
- await WriteString(httpContext, result_of_IntRouteArgument);
- }
-
- }
-
- // END: GET_age_age
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_api_myapp_registration_price.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_api_myapp_registration_price.cs
deleted file mode 100644
index 43d4d83e3..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_api_myapp_registration_price.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_api_myapp_registration_price
- public class GET_api_myapp_registration_price : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_api_myapp_registration_price(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- int numberOfMembers = default;
- int.TryParse(httpContext.Request.Query["numberOfMembers"], System.Globalization.CultureInfo.InvariantCulture, out numberOfMembers);
-
- // The actual HTTP request handler execution
- var decimalValue_response = WolverineWebApi.Bugs.MyAppLandingEndpoint.GetRegistrationPrice(numberOfMembers);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, decimalValue_response);
- }
-
- }
-
- // END: GET_api_myapp_registration_price
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_api_todo_id.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_api_todo_id.cs
deleted file mode 100644
index 13f4f4282..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_api_todo_id.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_api_todo_id
- public class GET_api_todo_id : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public GET_api_todo_id(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- var id = (string)httpContext.GetRouteValue("id");
-
- // Try to load the existing saga document
- var todo2 = await documentSession.LoadAsync(id, httpContext.RequestAborted).ConfigureAwait(false);
- // 404 if this required object is null
- if (todo2 == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- var todo2_response = WolverineWebApi.Todos.TodoHandler.Get(todo2);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, todo2_response);
- }
-
- }
-
- // END: GET_api_todo_id
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_correlation.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_correlation.cs
deleted file mode 100644
index 2cbfc3e53..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_correlation.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_correlation
- public class GET_correlation : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public GET_correlation(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)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);
-
- // The actual HTTP request handler execution
- var result_of_GetCorrelation = WolverineWebApi.TracingEndpoint.GetCorrelation(messageContext);
-
- await WriteString(httpContext, result_of_GetCorrelation);
- }
-
- }
-
- // END: GET_correlation
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_data_id.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_data_id.cs
deleted file mode 100644
index e2755b318..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_data_id.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_data_id
- public class GET_data_id : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public GET_data_id(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("id"), out var id))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // Just saying hello in the code! Also testing the usage of attributes to customize endpoints
- var serviceEndpoints = new WolverineWebApi.ServiceEndpoints();
-
- // The actual HTTP request handler execution
- var data_response = await serviceEndpoints.GetData(id, documentSession).ConfigureAwait(false);
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, data_response);
- }
-
- }
-
- // END: GET_data_id
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_discovered.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_discovered.cs
deleted file mode 100644
index a2411a491..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_discovered.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_discovered
- public class GET_discovered : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_discovered(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_Get = WolverineWebApi.DiscoverMe.Get();
-
- await WriteString(httpContext, result_of_Get);
- }
-
- }
-
- // END: GET_discovered
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_document_required_document_attribute_only_id.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_document_required_document_attribute_only_id.cs
deleted file mode 100644
index 35edfef23..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_document_required_document_attribute_only_id.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_document_required_document_attribute_only_id
- public class GET_document_required_document_attribute_only_id : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public GET_document_required_document_attribute_only_id(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("id"), out var id))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- var invoice = await documentSession.LoadAsync(id, httpContext.RequestAborted).ConfigureAwait(false);
- // 404 if this required object is null
- if (invoice == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
- var problemDetails1 = WolverineWebApi.Marten.DocumentRequiredEndpoint.Load(invoice);
- // Evaluate whether the processing should stop if there are any problems
- if (!(ReferenceEquals(problemDetails1, Wolverine.Http.WolverineContinue.NoProblems)))
- {
- await WriteProblems(problemDetails1, httpContext).ConfigureAwait(false);
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- var invoice_response = WolverineWebApi.Marten.DocumentRequiredEndpoint.DocumentAttributeOnly(invoice);
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, invoice_response);
- }
-
- }
-
- // END: GET_document_required_document_attribute_only_id
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_document_required_separate_attributes_id.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_document_required_separate_attributes_id.cs
deleted file mode 100644
index 539248eba..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_document_required_separate_attributes_id.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_document_required_separate_attributes_id
- public class GET_document_required_separate_attributes_id : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public GET_document_required_separate_attributes_id(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("id"), out var id))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- var invoice = await documentSession.LoadAsync(id, httpContext.RequestAborted).ConfigureAwait(false);
- var problemDetails1 = WolverineWebApi.Marten.DocumentRequiredEndpoint.Load(invoice);
- // Evaluate whether the processing should stop if there are any problems
- if (!(ReferenceEquals(problemDetails1, Wolverine.Http.WolverineContinue.NoProblems)))
- {
- await WriteProblems(problemDetails1, httpContext).ConfigureAwait(false);
- return;
- }
-
-
- // 404 if this required object is null
- if (invoice == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- var invoice_response = WolverineWebApi.Marten.DocumentRequiredEndpoint.SeparateAttributes(invoice);
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, invoice_response);
- }
-
- }
-
- // END: GET_document_required_separate_attributes_id
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_enum_direction.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_enum_direction.cs
deleted file mode 100644
index f1f168d7f..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_enum_direction.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_enum_direction
- public class GET_enum_direction : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_enum_direction(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- if (!WolverineWebApi.Direction.TryParse((string)httpContext.GetRouteValue("direction"), true, out WolverineWebApi.Direction direction))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- var fakeEndpoint = new WolverineWebApi.FakeEndpoint();
-
- // The actual HTTP request handler execution
- var result_of_ReadEnumArgument = fakeEndpoint.ReadEnumArgument(direction);
-
- await WriteString(httpContext, result_of_ReadEnumArgument);
- }
-
- }
-
- // END: GET_enum_direction
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_headers_accepts.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_headers_accepts.cs
deleted file mode 100644
index 3aad6da38..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_headers_accepts.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_headers_accepts
- public class GET_headers_accepts : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_headers_accepts(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- // Retrieve header value from the request
- var accepts = ReadSingleHeaderValue(httpContext, "accepts");
- // Retrieve header value from the request
- var day = ReadSingleHeaderValue(httpContext, "x-day");
- WolverineWebApi.HeaderUsingEndpoint.Before(day);
- var headerUsingEndpoint = new WolverineWebApi.HeaderUsingEndpoint();
-
- // The actual HTTP request handler execution
- var result_of_GetETag = headerUsingEndpoint.GetETag(accepts);
-
- await WriteString(httpContext, result_of_GetETag);
- }
-
- }
-
- // END: GET_headers_accepts
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_headers_int.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_headers_int.cs
deleted file mode 100644
index 3bbb223a2..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_headers_int.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_headers_int
- public class GET_headers_int : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_headers_int(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- int number = default;
- int.TryParse(ReadSingleHeaderValue(httpContext, "x-wolverine"), out number);
- // Retrieve header value from the request
- var day = ReadSingleHeaderValue(httpContext, "x-day");
- WolverineWebApi.HeaderUsingEndpoint.Before(day);
- var headerUsingEndpoint = new WolverineWebApi.HeaderUsingEndpoint();
-
- // The actual HTTP request handler execution
- var result_of_Get = headerUsingEndpoint.Get(number);
-
- await WriteString(httpContext, result_of_Get);
- }
-
- }
-
- // END: GET_headers_int
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_headers_simple.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_headers_simple.cs
deleted file mode 100644
index 5fcbbf1b5..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_headers_simple.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_headers_simple
- public class GET_headers_simple : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_headers_simple(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- // Retrieve header value from the request
- var name = ReadSingleHeaderValue(httpContext, "x-wolverine");
- // Retrieve header value from the request
- var day = ReadSingleHeaderValue(httpContext, "x-day");
- WolverineWebApi.HeaderUsingEndpoint.Before(day);
- var headerUsingEndpoint = new WolverineWebApi.HeaderUsingEndpoint();
-
- // The actual HTTP request handler execution
- var result_of_Get = headerUsingEndpoint.Get(name);
-
- await WriteString(httpContext, result_of_Get);
- }
-
- }
-
- // END: GET_headers_simple
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_hello.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_hello.cs
deleted file mode 100644
index 987d91b87..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_hello.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_hello
- public class GET_hello : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_hello(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- // Just saying hello in the code! Also testing the usage of attributes to customize endpoints
-
- // The actual HTTP request handler execution
- var result_of_Speak = WolverineWebApi.TestEndpoints.Speak();
-
- await WriteString(httpContext, result_of_Speak);
- }
-
- }
-
- // END: GET_hello
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_context.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_context.cs
deleted file mode 100644
index 44cdafa4a..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_context.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_http_context
- public class GET_http_context : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_http_context(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var httpContextEndpoints = new WolverineWebApi.HttpContextEndpoints();
-
- // The actual HTTP request handler execution
- httpContextEndpoints.UseHttpContext(httpContext);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: GET_http_context
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_identifier.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_identifier.cs
deleted file mode 100644
index 944bf1e44..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_identifier.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_http_identifier
- public class GET_http_identifier : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_http_identifier(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var httpContextEndpoints = new WolverineWebApi.HttpContextEndpoints();
-
- // The actual HTTP request handler execution
- var result_of_UseTraceIdentifier = httpContextEndpoints.UseTraceIdentifier(httpContext.TraceIdentifier);
-
- await WriteString(httpContext, result_of_UseTraceIdentifier);
- }
-
- }
-
- // END: GET_http_identifier
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_principal.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_principal.cs
deleted file mode 100644
index fcbbe54fc..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_principal.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_http_principal
- public class GET_http_principal : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_http_principal(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var httpContextEndpoints = new WolverineWebApi.HttpContextEndpoints();
-
- // The actual HTTP request handler execution
- httpContextEndpoints.UseClaimsPrincipal(httpContext.User);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: GET_http_principal
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_request.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_request.cs
deleted file mode 100644
index 5c5e89a84..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_request.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_http_request
- public class GET_http_request : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_http_request(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var httpContextEndpoints = new WolverineWebApi.HttpContextEndpoints();
-
- // The actual HTTP request handler execution
- httpContextEndpoints.UseHttpRequest(httpContext.Request);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: GET_http_request
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_response.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_response.cs
deleted file mode 100644
index a3ba0647d..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_http_response.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_http_response
- public class GET_http_response : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_http_response(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var httpContextEndpoints = new WolverineWebApi.HttpContextEndpoints();
-
- // The actual HTTP request handler execution
- httpContextEndpoints.UseHttpResponse(httpContext.Response);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: GET_http_response
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_approved.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_approved.cs
deleted file mode 100644
index 65138716b..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_approved.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_invoices_approved
- public class GET_invoices_approved : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public GET_invoices_approved(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var querySession = _outboxedSessionFactory.QuerySession(messageContext);
-
- // The actual HTTP request handler execution
- var approvedInvoicedCompiledQuery = WolverineWebApi.Marten.InvoicesEndpoint.GetApproved();
-
- await Marten.AspNetCore.QueryableExtensions.WriteArray>(querySession, approvedInvoicedCompiledQuery, httpContext, "application/json", 200).ConfigureAwait(false);
- }
-
- }
-
- // END: GET_invoices_approved
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_compiled_count.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_compiled_count.cs
deleted file mode 100644
index a8ceefd35..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_compiled_count.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_invoices_compiled_count
- public class GET_invoices_compiled_count : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public GET_invoices_compiled_count(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
-
- // The actual HTTP request handler execution
- var compiledCountQuery = WolverineWebApi.Marten.InvoicesEndpoint.GetCompiledCount();
-
- var result_of_QueryAsync = await documentSession.QueryAsync(compiledCountQuery, httpContext.RequestAborted).ConfigureAwait(false);
- await Wolverine.Http.HttpHandler.WriteString(httpContext, result_of_QueryAsync.ToString()).ConfigureAwait(false);
- }
-
- }
-
- // END: GET_invoices_compiled_count
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_compiled_id.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_compiled_id.cs
deleted file mode 100644
index 5693010b6..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_compiled_id.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_invoices_compiled_id
- public class GET_invoices_compiled_id : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public GET_invoices_compiled_id(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var querySession = _outboxedSessionFactory.QuerySession(messageContext);
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("id"), out var id))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- var byIdCompiled = WolverineWebApi.Marten.InvoicesEndpoint.GetCompiled(id);
-
- await Marten.AspNetCore.QueryableExtensions.WriteOne(querySession, byIdCompiled, httpContext, "application/json", 200).ConfigureAwait(false);
- }
-
- }
-
- // END: GET_invoices_compiled_id
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_id.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_id.cs
deleted file mode 100644
index cc500d631..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_id.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_invoices_id
- public class GET_invoices_id : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public GET_invoices_id(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("id"), out var id))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- var invoice = await documentSession.LoadAsync(id, httpContext.RequestAborted).ConfigureAwait(false);
- // 404 if this required object is null
- if (invoice == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- var invoice_response = WolverineWebApi.Marten.InvoicesEndpoint.Get(invoice);
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, invoice_response);
- }
-
- }
-
- // END: GET_invoices_id
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_soft_delete_id.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_soft_delete_id.cs
deleted file mode 100644
index 866f1be9d..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_invoices_soft_delete_id.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_invoices_soft_delete_id
- public class GET_invoices_soft_delete_id : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public GET_invoices_soft_delete_id(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("id"), out var id))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- var invoice = await documentSession.LoadAsync(id, httpContext.RequestAborted).ConfigureAwait(false);
- // If the document is soft deleted, set the variable to null
- var invoiceMetadata = invoice != null
- ? await documentSession.MetadataForAsync(invoice).ConfigureAwait(false)
- : null;
- if (invoiceMetadata?.Deleted == true)
- {
- invoice = null;
- }
-
- // 404 if this required object is null
- if (invoice == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- var invoice_response = WolverineWebApi.Marten.InvoicesEndpoint.GetSoftDeleted(invoice);
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, invoice_response);
- }
-
- }
-
- // END: GET_invoices_soft_delete_id
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_message_message.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_message_message.cs
deleted file mode 100644
index def329788..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_message_message.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using WolverineWebApi;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_message_message
- public class GET_message_message : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly WolverineWebApi.Recorder _recorder;
-
- public GET_message_message(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, WolverineWebApi.Recorder recorder) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _recorder = recorder;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var message = (string)httpContext.GetRouteValue("message");
- var serviceEndpoints = new WolverineWebApi.ServiceEndpoints();
-
- // The actual HTTP request handler execution
- var result_of_GetMessage = serviceEndpoints.GetMessage(message, _recorder);
-
- await WriteString(httpContext, result_of_GetMessage);
- }
-
- }
-
- // END: GET_message_message
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_middleware_intrinsic.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_middleware_intrinsic.cs
deleted file mode 100644
index 901fe1e60..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_middleware_intrinsic.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using WolverineWebApi;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_middleware_intrinsic
- public class GET_middleware_intrinsic : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly WolverineWebApi.Recorder _recorder;
-
- public GET_middleware_intrinsic(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, WolverineWebApi.Recorder recorder) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _recorder = recorder;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- WolverineWebApi.BeforeAndAfterEndpoint.Before(_recorder);
- var beforeAndAfterEndpoint = new WolverineWebApi.BeforeAndAfterEndpoint();
-
- // The actual HTTP request handler execution
- var result_of_GetRequest = beforeAndAfterEndpoint.GetRequest(_recorder);
-
- WolverineWebApi.BeforeAndAfterEndpoint.After(_recorder);
- await WriteString(httpContext, result_of_GetRequest);
- }
-
- }
-
- // END: GET_middleware_intrinsic
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_middleware_simple.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_middleware_simple.cs
deleted file mode 100644
index ad97a7b02..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_middleware_simple.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using WolverineWebApi;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_middleware_simple
- public class GET_middleware_simple : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly WolverineWebApi.Recorder _recorder;
-
- public GET_middleware_simple(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, WolverineWebApi.Recorder recorder) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _recorder = recorder;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- WolverineWebApi.BeforeAndAfterMiddleware.Before(_recorder);
- var middlewareEndpoints = new WolverineWebApi.MiddlewareEndpoints();
-
- // The actual HTTP request handler execution
- var result_of_GetRequest = middlewareEndpoints.GetRequest(_recorder);
-
- WolverineWebApi.BeforeAndAfterMiddleware.After(_recorder);
- await WriteString(httpContext, result_of_GetRequest);
- }
-
- }
-
- // END: GET_middleware_simple
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_name_name.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_name_name.cs
deleted file mode 100644
index 94d53159a..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_name_name.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_name_name
- public class GET_name_name : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_name_name(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var name = (string)httpContext.GetRouteValue("name");
- // Just saying hello in the code! Also testing the usage of attributes to customize endpoints
-
- // The actual HTTP request handler execution
- var result_of_SimpleStringRouteArgument = WolverineWebApi.TestEndpoints.SimpleStringRouteArgument(name);
-
- await WriteString(httpContext, result_of_SimpleStringRouteArgument);
- }
-
- }
-
- // END: GET_name_name
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_collection_enum.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_collection_enum.cs
deleted file mode 100644
index b158e1da7..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_collection_enum.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_querystring_collection_enum
- public class GET_querystring_collection_enum : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_querystring_collection_enum(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var collection = new System.Collections.Generic.List();
- foreach (var collectionValue in httpContext.Request.Query["collection"])
- {
- if (WolverineWebApi.Direction.TryParse(collectionValue, out var collectionValueParsed))
- {
- collection.Add(collectionValueParsed);
- }
-
- }
-
-
- // The actual HTTP request handler execution
- var result_of_UsingEnumCollection = WolverineWebApi.QuerystringCollectionEndpoints.UsingEnumCollection(collection);
-
- await WriteString(httpContext, result_of_UsingEnumCollection);
- }
-
- }
-
- // END: GET_querystring_collection_enum
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_collection_guid.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_collection_guid.cs
deleted file mode 100644
index 0baadddce..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_collection_guid.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_querystring_collection_guid
- public class GET_querystring_collection_guid : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_querystring_collection_guid(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var collection = new System.Collections.Generic.List();
- foreach (var collectionValue in httpContext.Request.Query["collection"])
- {
- if (System.Guid.TryParse(collectionValue, System.Globalization.CultureInfo.InvariantCulture, out var collectionValueParsed))
- {
- collection.Add(collectionValueParsed);
- }
-
- }
-
-
- // The actual HTTP request handler execution
- var result_of_UsingGuidCollection = WolverineWebApi.QuerystringCollectionEndpoints.UsingGuidCollection(collection);
-
- await WriteString(httpContext, result_of_UsingGuidCollection);
- }
-
- }
-
- // END: GET_querystring_collection_guid
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_collection_int.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_collection_int.cs
deleted file mode 100644
index abbcd70ec..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_collection_int.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_querystring_collection_int
- public class GET_querystring_collection_int : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_querystring_collection_int(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var collection = new System.Collections.Generic.List();
- foreach (var collectionValue in httpContext.Request.Query["collection"])
- {
- if (int.TryParse(collectionValue, System.Globalization.CultureInfo.InvariantCulture, out var collectionValueParsed))
- {
- collection.Add(collectionValueParsed);
- }
-
- }
-
-
- // The actual HTTP request handler execution
- var result_of_UsingIntCollection = WolverineWebApi.QuerystringCollectionEndpoints.UsingIntCollection(collection);
-
- await WriteString(httpContext, result_of_UsingIntCollection);
- }
-
- }
-
- // END: GET_querystring_collection_int
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_collection_string.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_collection_string.cs
deleted file mode 100644
index fa94b12c1..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_collection_string.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_querystring_collection_string
- public class GET_querystring_collection_string : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_querystring_collection_string(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var collection = new System.Collections.Generic.List();
- collection.AddRange(httpContext.Request.Query["collection"]);
-
- // The actual HTTP request handler execution
- var result_of_UsingStringCollection = WolverineWebApi.QuerystringCollectionEndpoints.UsingStringCollection(collection);
-
- await WriteString(httpContext, result_of_UsingStringCollection);
- }
-
- }
-
- // END: GET_querystring_collection_string
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_decimal.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_decimal.cs
deleted file mode 100644
index b352a57f9..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_decimal.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using WolverineWebApi;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_querystring_decimal
- public class GET_querystring_decimal : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly WolverineWebApi.Recorder _recorder;
-
- public GET_querystring_decimal(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, WolverineWebApi.Recorder recorder) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _recorder = recorder;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- System.Decimal amount = default;
- System.Decimal.TryParse(httpContext.Request.Query["amount"], System.Globalization.CultureInfo.InvariantCulture, out amount);
- // Just saying hello in the code! Also testing the usage of attributes to customize endpoints
-
- // The actual HTTP request handler execution
- var result_of_UseQueryStringParsing = WolverineWebApi.TestEndpoints.UseQueryStringParsing(_recorder, amount);
-
- await WriteString(httpContext, result_of_UseQueryStringParsing);
- }
-
- }
-
- // END: GET_querystring_decimal
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_enum.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_enum.cs
deleted file mode 100644
index 3f6cd8e62..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_enum.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_querystring_enum
- public class GET_querystring_enum : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_querystring_enum(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- WolverineWebApi.Direction direction = default;
- WolverineWebApi.Direction.TryParse(httpContext.Request.Query["direction"], out direction);
-
- // The actual HTTP request handler execution
- var result_of_UsingEnumQuerystring = WolverineWebApi.QuerystringEndpoints.UsingEnumQuerystring(direction);
-
- await WriteString(httpContext, result_of_UsingEnumQuerystring);
- }
-
- }
-
- // END: GET_querystring_enum
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_explicit.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_explicit.cs
deleted file mode 100644
index 0c717e5d8..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_explicit.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_querystring_explicit
- public class GET_querystring_explicit : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_querystring_explicit(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- string name = httpContext.Request.Query["name"].FirstOrDefault();
-
- // The actual HTTP request handler execution
- var result_of_UsingEnumQuerystring = WolverineWebApi.QuerystringEndpoints.UsingEnumQuerystring(name);
-
- await WriteString(httpContext, result_of_UsingEnumQuerystring);
- }
-
- }
-
- // END: GET_querystring_explicit
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_int.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_int.cs
deleted file mode 100644
index 323321c85..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_int.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using WolverineWebApi;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_querystring_int
- public class GET_querystring_int : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly WolverineWebApi.Recorder _recorder;
-
- public GET_querystring_int(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, WolverineWebApi.Recorder recorder) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _recorder = recorder;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- int? age = null;
- if (int.TryParse(httpContext.Request.Query["age"], System.Globalization.CultureInfo.InvariantCulture, out var ageParsed)) age = ageParsed;
- // Just saying hello in the code! Also testing the usage of attributes to customize endpoints
-
- // The actual HTTP request handler execution
- var result_of_UsingQueryStringParsing = WolverineWebApi.TestEndpoints.UsingQueryStringParsing(_recorder, age);
-
- await WriteString(httpContext, result_of_UsingQueryStringParsing);
- }
-
- }
-
- // END: GET_querystring_int
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_int_nullable.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_int_nullable.cs
deleted file mode 100644
index 5f57729e4..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_int_nullable.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_querystring_int_nullable
- public class GET_querystring_int_nullable : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_querystring_int_nullable(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- int? age = null;
- if (int.TryParse(httpContext.Request.Query["age"], System.Globalization.CultureInfo.InvariantCulture, out var ageParsed)) age = ageParsed;
- // Just saying hello in the code! Also testing the usage of attributes to customize endpoints
-
- // The actual HTTP request handler execution
- var result_of_UsingQueryStringParsingNullable = WolverineWebApi.TestEndpoints.UsingQueryStringParsingNullable(age);
-
- await WriteString(httpContext, result_of_UsingQueryStringParsingNullable);
- }
-
- }
-
- // END: GET_querystring_int_nullable
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_intarray.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_intarray.cs
deleted file mode 100644
index b772a68b3..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_intarray.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_querystring_intarray
- public class GET_querystring_intarray : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_querystring_intarray(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var values_List = new System.Collections.Generic.List();
- foreach (var valuesValue in httpContext.Request.Query["values"])
- {
- if (int.TryParse(valuesValue, System.Globalization.CultureInfo.InvariantCulture, out var valuesValueParsed))
- {
- values_List.Add(valuesValueParsed);
- }
-
- }
-
- var values = values_List.ToArray();
-
- // The actual HTTP request handler execution
- var result_of_IntArray = WolverineWebApi.QuerystringEndpoints.IntArray(values);
-
- await WriteString(httpContext, result_of_IntArray);
- }
-
- }
-
- // END: GET_querystring_intarray
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_string.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_string.cs
deleted file mode 100644
index 44e55e0d6..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_string.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_querystring_string
- public class GET_querystring_string : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_querystring_string(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- string name = httpContext.Request.Query["name"].FirstOrDefault();
- // Just saying hello in the code! Also testing the usage of attributes to customize endpoints
-
- // The actual HTTP request handler execution
- var result_of_UsingQueryString = WolverineWebApi.TestEndpoints.UsingQueryString(name);
-
- await WriteString(httpContext, result_of_UsingQueryString);
- }
-
- }
-
- // END: GET_querystring_string
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_stringarray.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_stringarray.cs
deleted file mode 100644
index 572216f00..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_querystring_stringarray.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_querystring_stringarray
- public class GET_querystring_stringarray : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_querystring_stringarray(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var values = httpContext.Request.Query["values"].ToArray();
-
- // The actual HTTP request handler execution
- var result_of_StringArray = WolverineWebApi.QuerystringEndpoints.StringArray(values);
-
- await WriteString(httpContext, result_of_StringArray);
- }
-
- }
-
- // END: GET_querystring_stringarray
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_result.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_result.cs
deleted file mode 100644
index 5f34df967..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_result.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_result
- public class GET_result : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_result(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
-
- // The actual HTTP request handler execution
- var result = WolverineWebApi.ResultEndpoints.GetResult();
-
- return result.ExecuteAsync(httpContext);
- }
-
- }
-
- // END: GET_result
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_result_async.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_result_async.cs
deleted file mode 100644
index 19eacbc71..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_result_async.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_result_async
- public class GET_result_async : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_result_async(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 = await WolverineWebApi.ResultEndpoints.GetAsyncResult().ConfigureAwait(false);
-
- await result.ExecuteAsync(httpContext).ConfigureAwait(false);
- }
-
- }
-
- // END: GET_result_async
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_results_static.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_results_static.cs
deleted file mode 100644
index 2d8d30c43..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_results_static.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_results_static
- public class GET_results_static : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_results_static(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- // Just saying hello in the code! Also testing the usage of attributes to customize endpoints
-
- // The actual HTTP request handler execution
- var arithmeticResults_response = WolverineWebApi.TestEndpoints.FetchStaticResults();
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, arithmeticResults_response);
- }
-
- }
-
- // END: GET_results_static
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_wildcard_name.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_wildcard_name.cs
deleted file mode 100644
index 3938ff58c..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_wildcard_name.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_wildcard_name
- public class GET_wildcard_name : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public GET_wildcard_name(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var name = (string)httpContext.GetRouteValue("name");
- var wildcardEndpoint = new WolverineWebApi.WildcardEndpoint();
-
- // The actual HTTP request handler execution
- var result_of_Wildcard = wildcardEndpoint.Wildcard(name);
-
- await WriteString(httpContext, result_of_Wildcard);
- }
-
- }
-
- // END: GET_wildcard_name
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_write_to_id.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_write_to_id.cs
deleted file mode 100644
index 01df1d3c7..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/GET_write_to_id.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: GET_write_to_id
- public class GET_write_to_id : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public GET_write_to_id(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var querySession = _outboxedSessionFactory.QuerySession(messageContext);
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("id"), out var id))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- await WolverineWebApi.WriteToEndpoints.GetAssetCodeView(id, querySession, httpContext).ConfigureAwait(false);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: GET_write_to_id
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage1Handler862252953.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage1Handler862252953.cs
deleted file mode 100644
index 28ebbeaae..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage1Handler862252953.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-#pragma warning disable
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: HttpMessage1Handler862252953
- public class HttpMessage1Handler862252953 : Wolverine.Runtime.Handlers.MessageHandler
- {
-
-
- public override System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // The actual message body
- var httpMessage1 = (WolverineWebApi.HttpMessage1)context.Envelope.Message;
-
-
- // The actual message execution
- WolverineWebApi.MessageHandler.Handle(httpMessage1);
-
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: HttpMessage1Handler862252953
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage2Handler1265537480.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage2Handler1265537480.cs
deleted file mode 100644
index 3bf1a85a0..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage2Handler1265537480.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-#pragma warning disable
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: HttpMessage2Handler1265537480
- public class HttpMessage2Handler1265537480 : Wolverine.Runtime.Handlers.MessageHandler
- {
-
-
- public override System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // The actual message body
- var httpMessage2 = (WolverineWebApi.HttpMessage2)context.Envelope.Message;
-
-
- // The actual message execution
- WolverineWebApi.MessageHandler.Handle(httpMessage2);
-
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: HttpMessage2Handler1265537480
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage3Handler300546461.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage3Handler300546461.cs
deleted file mode 100644
index 06ecc2c1f..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage3Handler300546461.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-#pragma warning disable
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: HttpMessage3Handler300546461
- public class HttpMessage3Handler300546461 : Wolverine.Runtime.Handlers.MessageHandler
- {
-
-
- public override System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // The actual message body
- var httpMessage3 = (WolverineWebApi.HttpMessage3)context.Envelope.Message;
-
-
- // The actual message execution
- WolverineWebApi.MessageHandler.Handle(httpMessage3);
-
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: HttpMessage3Handler300546461
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage4Handler102738066.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage4Handler102738066.cs
deleted file mode 100644
index aca0165db..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage4Handler102738066.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-#pragma warning disable
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: HttpMessage4Handler102738066
- public class HttpMessage4Handler102738066 : Wolverine.Runtime.Handlers.MessageHandler
- {
-
-
- public override System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // The actual message body
- var httpMessage4 = (WolverineWebApi.HttpMessage4)context.Envelope.Message;
-
-
- // The actual message execution
- WolverineWebApi.MessageHandler.Handle(httpMessage4);
-
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: HttpMessage4Handler102738066
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage5Handler1463345875.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage5Handler1463345875.cs
deleted file mode 100644
index 6603c853c..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/HttpMessage5Handler1463345875.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-#pragma warning disable
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: HttpMessage5Handler1463345875
- public class HttpMessage5Handler1463345875 : Wolverine.Runtime.Handlers.MessageHandler
- {
-
-
- public override System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // The actual message body
- var httpMessage5 = (WolverineWebApi.HttpMessage5)context.Envelope.Message;
-
-
- // The actual message execution
- WolverineWebApi.MessageHandler.Handle(httpMessage5);
-
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: HttpMessage5Handler1463345875
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/ItemCreatedHandler179438836.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/ItemCreatedHandler179438836.cs
deleted file mode 100644
index fd749a55d..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/ItemCreatedHandler179438836.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-#pragma warning disable
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: ItemCreatedHandler179438836
- public class ItemCreatedHandler179438836 : Wolverine.Runtime.Handlers.MessageHandler
- {
-
-
- public override System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // The actual message body
- var itemCreated = (WolverineWebApi.ItemCreated)context.Envelope.Message;
-
- var itemCreatedHandler = new WolverineWebApi.ItemCreatedHandler();
-
- // The actual message execution
- itemCreatedHandler.Handle(itemCreated);
-
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: ItemCreatedHandler179438836
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/MessageThatAlwaysGoesToDeadLetterHandler1388008025.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/MessageThatAlwaysGoesToDeadLetterHandler1388008025.cs
deleted file mode 100644
index ceb80a058..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/MessageThatAlwaysGoesToDeadLetterHandler1388008025.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-#pragma warning disable
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: MessageThatAlwaysGoesToDeadLetterHandler1388008025
- public class MessageThatAlwaysGoesToDeadLetterHandler1388008025 : Wolverine.Runtime.Handlers.MessageHandler
- {
-
-
- public override System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // The actual message body
- var messageThatAlwaysGoesToDeadLetter = (WolverineWebApi.MessageThatAlwaysGoesToDeadLetter)context.Envelope.Message;
-
-
- // The actual message execution
- WolverineWebApi.MessageHandler.Handle(messageThatAlwaysGoesToDeadLetter);
-
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: MessageThatAlwaysGoesToDeadLetterHandler1388008025
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/NumberMessageHandler722393759.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/NumberMessageHandler722393759.cs
deleted file mode 100644
index 6feb4c0a8..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/NumberMessageHandler722393759.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.Extensions.Logging;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: NumberMessageHandler722393759
- public class NumberMessageHandler722393759 : Wolverine.Runtime.Handlers.MessageHandler
- {
- private readonly Microsoft.Extensions.Logging.ILogger _loggerForMessage;
-
- public NumberMessageHandler722393759(Microsoft.Extensions.Logging.ILogger loggerForMessage)
- {
- _loggerForMessage = loggerForMessage;
- }
-
-
-
- public override async System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // The actual message body
- var numberMessage = (WolverineWebApi.NumberMessage)context.Envelope.Message;
-
- var problemDetails = WolverineWebApi.NumberMessageHandler.Validate(numberMessage);
- // Evaluate whether the processing should stop if there are any problems
- if (!(ReferenceEquals(problemDetails, Wolverine.Http.WolverineContinue.NoProblems)))
- {
- Wolverine.Http.CodeGen.ProblemDetailsContinuationPolicy.WriteProblems(((Microsoft.Extensions.Logging.ILogger)_loggerForMessage), problemDetails);
- return;
- }
-
-
-
- // The actual message execution
- WolverineWebApi.NumberMessageHandler.Handle(numberMessage);
-
- }
-
- }
-
- // END: NumberMessageHandler722393759
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_complete.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_complete.cs
deleted file mode 100644
index aff89a2ff..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_complete.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_todo_complete
- public class POST_api_todo_complete : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_api_todo_complete(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // Try to load the existing saga document
- var todo2 = await documentSession.LoadAsync(command.Id, httpContext.RequestAborted).ConfigureAwait(false);
- // 404 if this required object is null
- if (todo2 == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- var storageAction = WolverineWebApi.Todos.TodoHandler.Handle(command, todo2);
-
- if (storageAction != null)
- {
- Wolverine.Marten.Persistence.Sagas.MartenStorageActionApplier.ApplyAction(documentSession, storageAction);
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_api_todo_complete
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_create.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_create.cs
deleted file mode 100644
index daa24c41c..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_create.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_todo_create
- public class POST_api_todo_create : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_api_todo_create(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- var insert = WolverineWebApi.Todos.TodoHandler.Handle(command);
-
- if (insert != null)
- {
-
- // Register the document operation with the current session
- documentSession.Insert(insert.Entity);
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_api_todo_create
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_create2.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_create2.cs
deleted file mode 100644
index 107357ac9..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_create2.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_todo_create2
- public class POST_api_todo_create2 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_api_todo_create2(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- var store = WolverineWebApi.Todos.TodoHandler.Handle(command);
-
- if (store != null)
- {
-
- // Register the document operation with the current session
- documentSession.Store(store.Entity);
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_api_todo_create2
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_examinefirst.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_examinefirst.cs
deleted file mode 100644
index e40524ccf..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_examinefirst.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_todo_examinefirst
- public class POST_api_todo_examinefirst : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_api_todo_examinefirst(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // Try to load the existing saga document
- var todo2 = await documentSession.LoadAsync(command.Todo2Id, httpContext.RequestAborted).ConfigureAwait(false);
- // 404 if this required object is null
- if (todo2 == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
- var result1 = WolverineWebApi.Todos.ExamineFirstHandler.Before(todo2);
- // Evaluate whether or not the execution should be stopped based on the IResult value
- if (result1 != null && !(result1 is Wolverine.Http.WolverineContinue))
- {
- await result1.ExecuteAsync(httpContext).ConfigureAwait(false);
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- WolverineWebApi.Todos.ExamineFirstHandler.Handle(command);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_api_todo_examinefirst
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_maybecomplete.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_maybecomplete.cs
deleted file mode 100644
index 63cafad9a..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_maybecomplete.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_todo_maybecomplete
- public class POST_api_todo_maybecomplete : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_api_todo_maybecomplete(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // Try to load the existing saga document
- var todo2 = await documentSession.LoadAsync(command.Id, httpContext.RequestAborted).ConfigureAwait(false);
-
- // The actual HTTP request handler execution
- var storageAction = WolverineWebApi.Todos.TodoHandler.Handle(command, todo2);
-
- if (storageAction != null)
- {
- Wolverine.Marten.Persistence.Sagas.MartenStorageActionApplier.ApplyAction(documentSession, storageAction);
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_api_todo_maybecomplete
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_maybeinsert.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_maybeinsert.cs
deleted file mode 100644
index f4b3158c5..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_maybeinsert.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_todo_maybeinsert
- public class POST_api_todo_maybeinsert : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_api_todo_maybeinsert(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- var storageAction = WolverineWebApi.Todos.TodoHandler.Handle(command);
-
- if (storageAction != null)
- {
- Wolverine.Marten.Persistence.Sagas.MartenStorageActionApplier.ApplyAction(documentSession, storageAction);
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_api_todo_maybeinsert
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_maybetaskcompletewithbeforeusage.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_maybetaskcompletewithbeforeusage.cs
deleted file mode 100644
index 03ff20485..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_maybetaskcompletewithbeforeusage.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_todo_maybetaskcompletewithbeforeusage
- public class POST_api_todo_maybetaskcompletewithbeforeusage : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_api_todo_maybetaskcompletewithbeforeusage(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // Try to load the existing saga document
- var todo2 = await documentSession.LoadAsync(command.Id, httpContext.RequestAborted).ConfigureAwait(false);
- // 404 if this required object is null
- if (todo2 == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
- WolverineWebApi.Todos.MarkTaskCompleteIfBrokenHandler.Before(todo2);
-
- // The actual HTTP request handler execution
- var update = WolverineWebApi.Todos.MarkTaskCompleteIfBrokenHandler.Handle(command, todo2);
-
- if (update != null)
- {
-
- // Register the document operation with the current session
- documentSession.Update(update.Entity);
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_api_todo_maybetaskcompletewithbeforeusage
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_nullaction.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_nullaction.cs
deleted file mode 100644
index f08ab4367..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_nullaction.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_todo_nullaction
- public class POST_api_todo_nullaction : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_api_todo_nullaction(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- var storageAction = WolverineWebApi.Todos.TodoHandler.Handle(command);
-
- if (storageAction != null)
- {
- Wolverine.Marten.Persistence.Sagas.MartenStorageActionApplier.ApplyAction(documentSession, storageAction);
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_api_todo_nullaction
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_nullinsert.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_nullinsert.cs
deleted file mode 100644
index e1e19a72c..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_nullinsert.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_todo_nullinsert
- public class POST_api_todo_nullinsert : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_api_todo_nullinsert(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- var insert = WolverineWebApi.Todos.TodoHandler.Handle(command);
-
- if (insert != null)
- {
-
- // Register the document operation with the current session
- documentSession.Insert(insert.Entity);
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_api_todo_nullinsert
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_update.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_update.cs
deleted file mode 100644
index 25da838c0..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_update.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_todo_update
- public class POST_api_todo_update : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_api_todo_update(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // Try to load the existing saga document
- var todo2 = await documentSession.LoadAsync(command.Id, httpContext.RequestAborted).ConfigureAwait(false);
- // 404 if this required object is null
- if (todo2 == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- var update = WolverineWebApi.Todos.TodoHandler.Handle(command, todo2);
-
- if (update != null)
- {
-
- // Register the document operation with the current session
- documentSession.Update(update.Entity);
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_api_todo_update
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_update2.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_update2.cs
deleted file mode 100644
index 285bc959d..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_update2.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_todo_update2
- public class POST_api_todo_update2 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_api_todo_update2(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // Try to load the existing saga document
- var todo2 = await documentSession.LoadAsync(command.Todo2Id, httpContext.RequestAborted).ConfigureAwait(false);
- // 404 if this required object is null
- if (todo2 == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- var update = WolverineWebApi.Todos.TodoHandler.Handle(command, todo2);
-
- if (update != null)
- {
-
- // Register the document operation with the current session
- documentSession.Update(update.Entity);
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_api_todo_update2
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_update3.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_update3.cs
deleted file mode 100644
index 904ca054f..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_api_todo_update3.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_api_todo_update3
- public class POST_api_todo_update3 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_api_todo_update3(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // Try to load the existing saga document
- var todo2 = await documentSession.LoadAsync(command.Identity, httpContext.RequestAborted).ConfigureAwait(false);
- // 404 if this required object is null
- if (todo2 == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- var update = WolverineWebApi.Todos.TodoHandler.Handle(command, todo2);
-
- if (update != null)
- {
-
- // Register the document operation with the current session
- documentSession.Update(update.Entity);
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_api_todo_update3
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_authenticated.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_authenticated.cs
deleted file mode 100644
index 92e230848..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_authenticated.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_authenticated
- public class POST_authenticated : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public POST_authenticated(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var fakeAuthenticationMiddleware = new WolverineWebApi.FakeAuthenticationMiddleware();
- // Reading the request body via JSON deserialization
- var (request, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var result1 = WolverineWebApi.FakeAuthenticationMiddleware.Before(request);
- // Evaluate whether or not the execution should be stopped based on the IResult value
- if (result1 != null && !(result1 is Wolverine.Http.WolverineContinue))
- {
- await result1.ExecuteAsync(httpContext).ConfigureAwait(false);
- return;
- }
-
-
- var authenticatedEndpoint = new WolverineWebApi.AuthenticatedEndpoint();
-
- // The actual HTTP request handler execution
- var result_of_Get = authenticatedEndpoint.Get(request);
-
- await WriteString(httpContext, result_of_Get);
- }
-
- }
-
- // END: POST_authenticated
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_convert_book.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_convert_book.cs
deleted file mode 100644
index 97d418220..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_convert_book.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_convert_book
- public class POST_convert_book : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_convert_book(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)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);
- // Reading the request body via JSON deserialization
- var (@event, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- await WolverineWebApi.Bugs.ConvertBookEndpoint.Post(@event, messageContext, httpContext.RequestAborted).ConfigureAwait(false);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_convert_book
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_ef_create.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_ef_create.cs
deleted file mode 100644
index 35e704251..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_ef_create.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using Microsoft.EntityFrameworkCore;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_ef_create
- public class POST_ef_create : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Microsoft.EntityFrameworkCore.DbContextOptions _dbContextOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_ef_create(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Microsoft.EntityFrameworkCore.DbContextOptions dbContextOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _dbContextOptions = dbContextOptions;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var itemsDbContext = new WolverineWebApi.ItemsDbContext(_dbContextOptions);
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
-
- // Enroll the DbContext & IMessagingContext in the outgoing Wolverine outbox transaction
- var envelopeTransaction = Wolverine.EntityFrameworkCore.WolverineEntityCoreExtensions.BuildTransaction(itemsDbContext, messageContext);
- await messageContext.EnlistInOutboxAsync(envelopeTransaction);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var efCoreEndpoints = new WolverineWebApi.EfCoreEndpoints();
-
- // The actual HTTP request handler execution
- efCoreEndpoints.CreateItem(command, itemsDbContext);
-
-
- // Added by EF Core Transaction Middleware
- var result_of_SaveChangesAsync = await itemsDbContext.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
- // If we have separate context for outbox and application, then we need to manually commit the transaction
- if (envelopeTransaction is Wolverine.EntityFrameworkCore.Internals.RawDatabaseEnvelopeTransaction rawTx) { await rawTx.CommitAsync(); }
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_ef_create
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_ef_publish.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_ef_publish.cs
deleted file mode 100644
index b26440db7..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_ef_publish.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using Microsoft.EntityFrameworkCore;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_ef_publish
- public class POST_ef_publish : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Microsoft.EntityFrameworkCore.DbContextOptions _dbContextOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_ef_publish(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Microsoft.EntityFrameworkCore.DbContextOptions dbContextOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _dbContextOptions = dbContextOptions;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var itemsDbContext = new WolverineWebApi.ItemsDbContext(_dbContextOptions);
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);
-
- // Enroll the DbContext & IMessagingContext in the outgoing Wolverine outbox transaction
- var envelopeTransaction = Wolverine.EntityFrameworkCore.WolverineEntityCoreExtensions.BuildTransaction(itemsDbContext, messageContext);
- await messageContext.EnlistInOutboxAsync(envelopeTransaction);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var efCoreEndpoints = new WolverineWebApi.EfCoreEndpoints();
-
- // The actual HTTP request handler execution
- await efCoreEndpoints.PublishItem(command, itemsDbContext, messageContext).ConfigureAwait(false);
-
-
- // Added by EF Core Transaction Middleware
- var result_of_SaveChangesAsync = await itemsDbContext.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
- // If we have separate context for outbox and application, then we need to manually commit the transaction
- if (envelopeTransaction is Wolverine.EntityFrameworkCore.Internals.RawDatabaseEnvelopeTransaction rawTx) { await rawTx.CommitAsync(); }
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_ef_publish
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_fromservices.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_fromservices.cs
deleted file mode 100644
index 2c8e7e3bb..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_fromservices.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using WolverineWebApi;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_fromservices
- public class POST_fromservices : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly WolverineWebApi.Recorder _recorder;
-
- public POST_fromservices(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, WolverineWebApi.Recorder recorder) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _recorder = recorder;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var attributeEndpoints = new WolverineWebApi.AttributeEndpoints();
-
- // The actual HTTP request handler execution
- var result_of_PostFromServices = attributeEndpoints.PostFromServices(_recorder);
-
- await WriteString(httpContext, result_of_PostFromServices);
- }
-
- }
-
- // END: POST_fromservices
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_invoices_invoiceId_pay.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_invoices_invoiceId_pay.cs
deleted file mode 100644
index 8f9589e11..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_invoices_invoiceId_pay.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_invoices_invoiceId_pay
- public class POST_invoices_invoiceId_pay : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_invoices_invoiceId_pay(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("invoiceId"), out var invoiceId))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- var invoice = await documentSession.LoadAsync(invoiceId, httpContext.RequestAborted).ConfigureAwait(false);
- // 404 if this required object is null
- if (invoice == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- var martenOp = WolverineWebApi.Marten.InvoicesEndpoint.Pay(invoice);
-
- if (martenOp != null)
- {
-
- // Placed by Wolverine's ISideEffect policy
- martenOp.Execute(documentSession);
-
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_invoices_invoiceId_pay
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_invoices_number_approve.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_invoices_number_approve.cs
deleted file mode 100644
index 8ee0d8c9c..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_invoices_number_approve.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_invoices_number_approve
- public class POST_invoices_number_approve : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_invoices_number_approve(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("number"), out var number))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- var invoice = await documentSession.LoadAsync(number, httpContext.RequestAborted).ConfigureAwait(false);
- // 404 if this required object is null
- if (invoice == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- var martenOp = WolverineWebApi.Marten.InvoicesEndpoint.Approve(invoice);
-
- if (martenOp != null)
- {
-
- // Placed by Wolverine's ISideEffect policy
- martenOp.Execute(documentSession);
-
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_invoices_number_approve
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_issue.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_issue.cs
deleted file mode 100644
index 9b2e67dc6..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_issue.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_issue
- public class POST_issue : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_issue(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var createEndpoint = new WolverineWebApi.CreateEndpoint();
-
- // The actual HTTP request handler execution
- (var issueCreated_response, var insertDoc) = createEndpoint.Create(command);
-
- if (insertDoc != null)
- {
-
- // Placed by Wolverine's ISideEffect policy
- insertDoc.Execute(documentSession);
-
- }
-
- // This response type customizes the HTTP response
- ApplyHttpAware(issueCreated_response, httpContext);
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, issueCreated_response);
- }
-
- }
-
- // END: POST_issue
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_middleware_messages_name.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_middleware_messages_name.cs
deleted file mode 100644
index cc5a6d58e..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_middleware_messages_name.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_middleware_messages_name
- public class POST_middleware_messages_name : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_middleware_messages_name(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);
- var name = (string)httpContext.GetRouteValue("name");
- var outgoingMessages101 = WolverineWebApi.CascadingEndpoint.Before(name);
-
- // Outgoing, cascaded message
- await messageContext.EnqueueCascadingAsync(outgoingMessages101).ConfigureAwait(false);
-
-
- // The actual HTTP request handler execution
- var result_of_Post = WolverineWebApi.CascadingEndpoint.Post(name, documentSession);
-
- await WolverineWebApi.CascadingEndpoint.After(messageContext, name).ConfigureAwait(false);
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
- await WriteString(httpContext, result_of_Post);
-
- // 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: POST_middleware_messages_name
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_notbody.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_notbody.cs
deleted file mode 100644
index 7c7631bc0..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_notbody.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using WolverineWebApi;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_notbody
- public class POST_notbody : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly WolverineWebApi.Recorder _recorder;
-
- public POST_notbody(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, WolverineWebApi.Recorder recorder) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _recorder = recorder;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var attributeEndpoints = new WolverineWebApi.AttributeEndpoints();
-
- // The actual HTTP request handler execution
- var result_of_PostNotBody = attributeEndpoints.PostNotBody(_recorder);
-
- await WriteString(httpContext, result_of_PostNotBody);
- }
-
- }
-
- // END: POST_notbody
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_create.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_create.cs
deleted file mode 100644
index 3b762d5bf..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_create.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_orders_create
- public class POST_orders_create : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_orders_create(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- var orderStatus_response = WolverineWebApi.Marten.MarkItemEndpoint.StartOrder(command, documentSession);
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, orderStatus_response);
- }
-
- }
-
- // END: POST_orders_create
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_create2.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_create2.cs
deleted file mode 100644
index 63691fe3a..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_create2.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_orders_create2
- public class POST_orders_create2 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_orders_create2(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Catches any existing stream id collision exceptions
- try
- {
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- (var orderStatus_response, var startStream) = WolverineWebApi.Marten.MarkItemEndpoint.StartOrder2(command, documentSession);
-
- if (startStream != null)
- {
-
- // Placed by Wolverine's ISideEffect policy
- startStream.Execute(documentSession);
-
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, orderStatus_response);
- }
-
-
- catch(Marten.Exceptions.ExistingStreamIdCollisionException e)
- {
- await WolverineWebApi.Marten.StreamCollisionExceptionPolicy.RespondWithProblemDetails(e, httpContext);
- return;
- }
-
-
- }
-
- }
-
- // END: POST_orders_create2
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_create3.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_create3.cs
deleted file mode 100644
index e3618f908..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_create3.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_orders_create3
- public class POST_orders_create3 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_orders_create3(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Catches any existing stream id collision exceptions
- try
- {
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- (var creationResponse_response, var startStream) = WolverineWebApi.Marten.MarkItemEndpoint.StartOrder3(command);
-
- if (startStream != null)
- {
-
- // Placed by Wolverine's ISideEffect policy
- startStream.Execute(documentSession);
-
- }
-
- // This response type customizes the HTTP response
- ApplyHttpAware(creationResponse_response, httpContext);
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, creationResponse_response);
- }
-
-
- catch(Marten.Exceptions.ExistingStreamIdCollisionException e)
- {
- await WolverineWebApi.Marten.StreamCollisionExceptionPolicy.RespondWithProblemDetails(e, httpContext);
- return;
- }
-
-
- }
-
- }
-
- // END: POST_orders_create3
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_create4.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_create4.cs
deleted file mode 100644
index 832f43c65..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_create4.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_orders_create4
- public class POST_orders_create4 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_orders_create4(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Catches any existing stream id collision exceptions
- try
- {
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- (var orderStatus_response, var startStream) = WolverineWebApi.Marten.MarkItemEndpoint.StartOrder4(command);
-
- if (startStream != null)
- {
-
- // Placed by Wolverine's ISideEffect policy
- startStream.Execute(documentSession);
-
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, orderStatus_response);
- }
-
-
- catch(Marten.Exceptions.ExistingStreamIdCollisionException e)
- {
- await WolverineWebApi.Marten.StreamCollisionExceptionPolicy.RespondWithProblemDetails(e, httpContext);
- return;
- }
-
-
- }
-
- }
-
- // END: POST_orders_create4
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_id_confirm.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_id_confirm.cs
deleted file mode 100644
index 28b6b7a42..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_id_confirm.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_orders_id_confirm
- public class POST_orders_id_confirm : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_orders_id_confirm(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- var eventStore = documentSession.Events;
- var aggregateId = command.OrderId;
-
- // Loading Marten aggregate
- var eventStream = await eventStore.FetchForWriting(aggregateId, httpContext.RequestAborted).ConfigureAwait(false);
-
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("id"), out var id))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- (var acceptResponse_response, var events) = WolverineWebApi.Marten.MarkItemEndpoint.Confirm(command, eventStream.Aggregate);
-
- if (events != null)
- {
-
- // Capturing any possible events returned from the command handlers
- eventStream.AppendMany(events);
-
- }
-
- // This response type customizes the HTTP response
- ApplyHttpAware(acceptResponse_response, httpContext);
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, acceptResponse_response);
- }
-
- }
-
- // END: POST_orders_id_confirm
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_id_confirm2.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_id_confirm2.cs
deleted file mode 100644
index 90058b5f8..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_id_confirm2.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_orders_id_confirm2
- public class POST_orders_id_confirm2 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_orders_id_confirm2(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory, Wolverine.Runtime.IWolverineRuntime wolverineRuntime) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _outboxedSessionFactory = outboxedSessionFactory;
- _wolverineRuntime = wolverineRuntime;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- var eventStore = documentSession.Events;
- var aggregateId = command.OrderId;
-
- // Loading Marten aggregate
- var eventStream = await eventStore.FetchForWriting(aggregateId, httpContext.RequestAborted).ConfigureAwait(false);
-
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("id"), out var id))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- (var updatedAggregate, var events) = WolverineWebApi.Marten.MarkItemEndpoint.ConfirmDifferent(command, eventStream.Aggregate);
-
-
- // Outgoing, cascaded message
- await messageContext.EnqueueCascadingAsync(updatedAggregate).ConfigureAwait(false);
-
- if (events != null)
- {
-
- // Capturing any possible events returned from the command handlers
- eventStream.AppendMany(events);
-
- }
-
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
- var order_response = await eventStore.FetchLatest(aggregateId, httpContext.RequestAborted);
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, order_response);
-
- // 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: POST_orders_id_confirm2
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_itemready.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_itemready.cs
deleted file mode 100644
index 2a38af5eb..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_itemready.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_orders_itemready
- public class POST_orders_itemready : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_orders_itemready(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- var eventStore = documentSession.Events;
- var aggregateId = command.OrderId;
-
- // Loading Marten aggregate
- var eventStream = await eventStore.FetchForWriting(aggregateId, command.Version, httpContext.RequestAborted).ConfigureAwait(false);
-
- System.Guid id = default;
- System.Guid.TryParse(httpContext.Request.Query["id"], System.Globalization.CultureInfo.InvariantCulture, out id);
- long expectedVersion = default;
- long.TryParse(httpContext.Request.Query["expectedVersion"], System.Globalization.CultureInfo.InvariantCulture, out expectedVersion);
-
- // The actual HTTP request handler execution
- (var orderStatus_response, var events) = WolverineWebApi.Marten.MarkItemEndpoint.Post(command, eventStream.Aggregate);
-
- if (events != null)
- {
-
- // Capturing any possible events returned from the command handlers
- eventStream.AppendMany(events);
-
- }
-
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, orderStatus_response);
- }
-
- }
-
- // END: POST_orders_itemready
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_orderId_ship2.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_orderId_ship2.cs
deleted file mode 100644
index 213d2a172..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_orderId_ship2.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_orders_orderId_ship2
- public class POST_orders_orderId_ship2 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_orders_orderId_ship2(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("orderId"), out var orderId))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- var eventStore = documentSession.Events;
- var eventStream = await documentSession.Events.FetchForWriting(orderId, httpContext.RequestAborted);
- if (eventStream.Aggregate == null)
- {
- await Microsoft.AspNetCore.Http.Results.NotFound().ExecuteAsync(httpContext);
- return;
- }
-
-
- // The actual HTTP request handler execution
- var orderShipped = WolverineWebApi.Marten.MarkItemEndpoint.Ship(command, eventStream.Aggregate);
-
- eventStream.AppendOne(orderShipped);
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_orders_orderId_ship2
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_orderId_ship3.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_orderId_ship3.cs
deleted file mode 100644
index 29ba6d61e..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_orderId_ship3.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_orders_orderId_ship3
- public class POST_orders_orderId_ship3 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_orders_orderId_ship3(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("orderId"), out var orderId))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- var eventStore = documentSession.Events;
- var eventStream = await documentSession.Events.FetchForWriting(orderId, httpContext.RequestAborted);
- if (eventStream.Aggregate == null)
- {
- await Microsoft.AspNetCore.Http.Results.NotFound().ExecuteAsync(httpContext);
- return;
- }
-
-
- // The actual HTTP request handler execution
- var orderShipped = WolverineWebApi.Marten.MarkItemEndpoint.Ship3(eventStream.Aggregate);
-
- eventStream.AppendOne(orderShipped);
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_orders_orderId_ship3
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_orderId_ship4.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_orderId_ship4.cs
deleted file mode 100644
index 0971fdf10..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_orderId_ship4.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_orders_orderId_ship4
- public class POST_orders_orderId_ship4 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_orders_orderId_ship4(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- if (!System.Guid.TryParse((string)httpContext.GetRouteValue("orderId"), out var orderId))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- var eventStore = documentSession.Events;
- var eventStream = await documentSession.Events.FetchForWriting(orderId, httpContext.RequestAborted);
- if (eventStream.Aggregate == null)
- {
- await Microsoft.AspNetCore.Http.Results.NotFound().ExecuteAsync(httpContext);
- return;
- }
-
-
- // The actual HTTP request handler execution
- var orderShipped = WolverineWebApi.Marten.MarkItemEndpoint.Ship4(eventStream.Aggregate);
-
- eventStream.AppendOne(orderShipped);
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_orders_orderId_ship4
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_ship.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_ship.cs
deleted file mode 100644
index 5ec200b6d..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_orders_ship.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_orders_ship
- public class POST_orders_ship : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_orders_ship(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Reading the request body via JSON deserialization
- var (command, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- var eventStore = documentSession.Events;
- var aggregateId = command.OrderId;
-
- // Loading Marten aggregate
- var eventStream = await eventStore.FetchForWriting(aggregateId, httpContext.RequestAborted).ConfigureAwait(false);
-
- var problemDetails1 = WolverineWebApi.Marten.CanShipOrderMiddleWare.Before(command, eventStream.Aggregate);
- // Evaluate whether the processing should stop if there are any problems
- if (!(ReferenceEquals(problemDetails1, Wolverine.Http.WolverineContinue.NoProblems)))
- {
- await WriteProblems(problemDetails1, httpContext).ConfigureAwait(false);
- return;
- }
-
-
- System.Guid id = default;
- System.Guid.TryParse(httpContext.Request.Query["id"], System.Globalization.CultureInfo.InvariantCulture, out id);
-
- // The actual HTTP request handler execution
- var orderShipped = WolverineWebApi.Marten.MarkItemEndpoint.Ship(command, eventStream.Aggregate);
-
- eventStream.AppendOne(orderShipped);
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_orders_ship
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_problems.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_problems.cs
deleted file mode 100644
index b00ac6dcd..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_problems.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_problems
- public class POST_problems : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public POST_problems(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var problemDetailsUsageEndpoint = new WolverineWebApi.ProblemDetailsUsageEndpoint();
- // Reading the request body via JSON deserialization
- var (message, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var problemDetails1 = problemDetailsUsageEndpoint.Before(message);
- // Evaluate whether the processing should stop if there are any problems
- if (!(ReferenceEquals(problemDetails1, Wolverine.Http.WolverineContinue.NoProblems)))
- {
- await WriteProblems(problemDetails1, httpContext).ConfigureAwait(false);
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- var result_of_Post = WolverineWebApi.ProblemDetailsUsageEndpoint.Post(message);
-
- await WriteString(httpContext, result_of_Post);
- }
-
- }
-
- // END: POST_problems
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_problems2.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_problems2.cs
deleted file mode 100644
index e6e41de80..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_problems2.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_problems2
- public class POST_problems2 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public POST_problems2(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- // Reading the request body via JSON deserialization
- var (message, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var problemDetails1 = WolverineWebApi.NumberMessageHandler.Validate(message);
- // Evaluate whether the processing should stop if there are any problems
- if (!(ReferenceEquals(problemDetails1, Wolverine.Http.WolverineContinue.NoProblems)))
- {
- await WriteProblems(problemDetails1, httpContext).ConfigureAwait(false);
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- WolverineWebApi.NumberMessageHandler.Handle(message);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_problems2
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_publish_marten_message.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_publish_marten_message.cs
deleted file mode 100644
index acb3fb1d7..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_publish_marten_message.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_publish_marten_message
- public class POST_publish_marten_message : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_publish_marten_message(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);
- // Reading the request body via JSON deserialization
- var (data, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var serviceEndpoints = new WolverineWebApi.ServiceEndpoints();
-
- // The actual HTTP request handler execution
- await serviceEndpoints.PublishData(data, messageContext, documentSession).ConfigureAwait(false);
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_publish_marten_message
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_publish_message1.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_publish_message1.cs
deleted file mode 100644
index 28d5b11fe..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_publish_message1.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_publish_message1
- public class POST_publish_message1 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_publish_message1(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)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);
- // Reading the request body via JSON deserialization
- var (message, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var publishingEndpoint = new Wolverine.Http.Runtime.PublishingEndpoint();
-
- // The actual HTTP request handler execution
- var result_of_PublishAsync = await publishingEndpoint.PublishAsync(message, messageContext, httpContext.Response);
-
- await WriteString(httpContext, result_of_PublishAsync);
- }
-
- }
-
- // END: POST_publish_message1
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_question.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_question.cs
deleted file mode 100644
index 0acd72261..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_question.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_question
- public class POST_question : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public POST_question(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- // Reading the request body via JSON deserialization
- var (question, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- // Just saying hello in the code! Also testing the usage of attributes to customize endpoints
-
- // The actual HTTP request handler execution
- var arithmeticResults_response = WolverineWebApi.TestEndpoints.PostJson(question);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, arithmeticResults_response);
- }
-
- }
-
- // END: POST_question
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_reservation.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_reservation.cs
deleted file mode 100644
index e81862eeb..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_reservation.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_reservation
- public class POST_reservation : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_reservation(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (start, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- (var reservationBooked_response, var reservation, var reservationTimeout) = WolverineWebApi.ReservationEndpoint.Post(start);
-
-
- // Register the document operation with the current session
- documentSession.Insert(reservation);
-
- // Outgoing, cascaded message
- await messageContext.EnqueueCascadingAsync(reservationTimeout).ConfigureAwait(false);
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, reservationBooked_response);
-
- // 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: POST_reservation
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_send_always_dead_letter.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_send_always_dead_letter.cs
deleted file mode 100644
index 1ec96452f..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_send_always_dead_letter.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_send_always_dead_letter
- public class POST_send_always_dead_letter : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_send_always_dead_letter(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)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);
- // Reading the request body via JSON deserialization
- var (message, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var sendingEndpoint = new Wolverine.Http.Runtime.SendingEndpoint();
-
- // The actual HTTP request handler execution
- var result_of_SendAsync = await sendingEndpoint.SendAsync(message, messageContext, httpContext.Response);
-
- await WriteString(httpContext, result_of_SendAsync);
- }
-
- }
-
- // END: POST_send_always_dead_letter
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_send_message5.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_send_message5.cs
deleted file mode 100644
index 92f1bc4ad..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_send_message5.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_send_message5
- public class POST_send_message5 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_send_message5(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)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- Wolverine.Http.Runtime.RequestIdMiddleware.Apply(httpContext, messageContext);
- // Reading the request body via JSON deserialization
- var (message, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var sendingEndpoint = new Wolverine.Http.Runtime.SendingEndpoint();
-
- // The actual HTTP request handler execution
- var result_of_SendAsync = await sendingEndpoint.SendAsync(message, messageContext, httpContext.Response);
-
- await WriteString(httpContext, result_of_SendAsync);
- }
-
- }
-
- // END: POST_send_message5
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_some_id.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_some_id.cs
deleted file mode 100644
index de0949ea2..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_some_id.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_some_id
- public class POST_some_id : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public POST_some_id(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- // Reading the request body via JSON deserialization
- var (request, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var id = (string)httpContext.GetRouteValue("id");
- var someDocument = await WolverineWebApi.Bugs.SomeEndpoint.LoadAsync(id, documentSession).ConfigureAwait(false);
- // 404 if this required object is null
- if (someDocument == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- var storeDoc = WolverineWebApi.Bugs.SomeEndpoint.Handle(request, someDocument);
-
- if (storeDoc != null)
- {
-
- // Placed by Wolverine's ISideEffect policy
- storeDoc.Execute(documentSession);
-
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: POST_some_id
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_spawn.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_spawn.cs
deleted file mode 100644
index 3dc82ff93..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_spawn.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_spawn
- public class POST_spawn : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_spawn(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)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Reading the request body via JSON deserialization
- var (input, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- (var stringValue, var outgoingMessages) = WolverineWebApi.MessageSpawnerEndpoint.Post(input);
-
-
- // Outgoing, cascaded message
- await messageContext.EnqueueCascadingAsync(outgoingMessages).ConfigureAwait(false);
-
- await WriteString(httpContext, stringValue);
-
- // 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: POST_spawn
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_spawn2.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_spawn2.cs
deleted file mode 100644
index 6da998037..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_spawn2.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_spawn2
- public class POST_spawn2 : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
-
- public POST_spawn2(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)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
-
- // The actual HTTP request handler execution
- (var httpMessage1, var httpMessage2) = WolverineWebApi.MessageSpawnerEndpoint.Post();
-
-
- // Outgoing, cascaded message
- await messageContext.EnqueueCascadingAsync(httpMessage1).ConfigureAwait(false);
-
-
- // Outgoing, cascaded message
- await messageContext.EnqueueCascadingAsync(httpMessage2).ConfigureAwait(false);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
-
- // 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: POST_spawn2
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_status.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_status.cs
deleted file mode 100644
index b7836dbcc..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_status.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using Microsoft.Extensions.Logging;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_status
- public class POST_status : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Microsoft.Extensions.Logging.ILogger _loggerForMessage;
-
- public POST_status(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Microsoft.Extensions.Logging.ILogger loggerForMessage) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _loggerForMessage = loggerForMessage;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- // Reading the request body via JSON deserialization
- var (request, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- var result_of_PostStatusCode = WolverineWebApi.StatusCodeEndpoint.PostStatusCode(request, ((Microsoft.Extensions.Logging.ILogger)_loggerForMessage));
-
- httpContext.Response.StatusCode = result_of_PostStatusCode;
- }
-
- }
-
- // END: POST_status
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_users_sign_up.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_users_sign_up.cs
deleted file mode 100644
index 04d4a7814..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_users_sign_up.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_users_sign_up
- public class POST_users_sign_up : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
-
- public POST_users_sign_up(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- // Reading the request body via JSON deserialization
- var (request, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // The actual HTTP request handler execution
- var result = WolverineWebApi.SignupEndpoint.SignUp(request);
-
- await result.ExecuteAsync(httpContext).ConfigureAwait(false);
- }
-
- }
-
- // END: POST_users_sign_up
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_validate2_customer.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_validate2_customer.cs
deleted file mode 100644
index 598ea5a10..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_validate2_customer.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-#pragma warning disable
-using FluentValidation;
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Http.FluentValidation;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_validate2_customer
- public class POST_validate2_customer : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly FluentValidation.IValidator _validator;
- private readonly Wolverine.Http.FluentValidation.IProblemDetailSource _problemDetailSource;
-
- public POST_validate2_customer(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, FluentValidation.IValidator validator, Wolverine.Http.FluentValidation.IProblemDetailSource problemDetailSource) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _validator = validator;
- _problemDetailSource = problemDetailSource;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- // Reading the request body via JSON deserialization
- var (customer, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // Execute FluentValidation validators
- var result1 = await Wolverine.Http.FluentValidation.Internals.FluentValidationHttpExecutor.ExecuteOne(_validator, _problemDetailSource, customer).ConfigureAwait(false);
-
- // Evaluate whether or not the execution should be stopped based on the IResult value
- if (result1 != null && !(result1 is Wolverine.Http.WolverineContinue))
- {
- await result1.ExecuteAsync(httpContext).ConfigureAwait(false);
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- var result_of_Post = Wolverine.Http.Tests.DifferentAssembly.Validation.Validated2Endpoint.Post(customer);
-
- await WriteString(httpContext, result_of_Post);
- }
-
- }
-
- // END: POST_validate2_customer
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_validate_customer.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_validate_customer.cs
deleted file mode 100644
index 50f63af78..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_validate_customer.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-#pragma warning disable
-using FluentValidation;
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Http.FluentValidation;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_validate_customer
- public class POST_validate_customer : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly FluentValidation.IValidator _validator;
- private readonly Wolverine.Http.FluentValidation.IProblemDetailSource _problemDetailSource;
-
- public POST_validate_customer(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, FluentValidation.IValidator validator, Wolverine.Http.FluentValidation.IProblemDetailSource problemDetailSource) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _validator = validator;
- _problemDetailSource = problemDetailSource;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- // Reading the request body via JSON deserialization
- var (customer, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
-
- // Execute FluentValidation validators
- var result1 = await Wolverine.Http.FluentValidation.Internals.FluentValidationHttpExecutor.ExecuteOne(_validator, _problemDetailSource, customer).ConfigureAwait(false);
-
- // Evaluate whether or not the execution should be stopped based on the IResult value
- if (result1 != null && !(result1 is Wolverine.Http.WolverineContinue))
- {
- await result1.ExecuteAsync(httpContext).ConfigureAwait(false);
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- var result_of_Post = WolverineWebApi.Validation.CreateCustomerEndpoint.Post(customer);
-
- await WriteString(httpContext, result_of_Post);
- }
-
- }
-
- // END: POST_validate_customer
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_validate_user.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_validate_user.cs
deleted file mode 100644
index cc408fc04..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/POST_validate_user.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Http.FluentValidation;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: POST_validate_user
- public class POST_validate_user : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Http.FluentValidation.IProblemDetailSource _problemDetailSource;
- private readonly System.Collections.Generic.IEnumerable> _validatorIEnumerable;
-
- public POST_validate_user(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Http.FluentValidation.IProblemDetailSource problemDetailSource, System.Collections.Generic.IEnumerable> validatorIEnumerable) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _problemDetailSource = problemDetailSource;
- _validatorIEnumerable = validatorIEnumerable;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- // Reading the request body via JSON deserialization
- var (user, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var result1 = await Wolverine.Http.FluentValidation.Internals.FluentValidationHttpExecutor.ExecuteMany(_validatorIEnumerable, _problemDetailSource, user).ConfigureAwait(false);
- // Evaluate whether or not the execution should be stopped based on the IResult value
- if (result1 != null && !(result1 is Wolverine.Http.WolverineContinue))
- {
- await result1.ExecuteAsync(httpContext).ConfigureAwait(false);
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- var result_of_Post = WolverineWebApi.Validation.OtherValidatedEndpoint.Post(user);
-
- await WriteString(httpContext, result_of_Post);
- }
-
- }
-
- // END: POST_validate_user
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/PUT_todos2_id.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/PUT_todos2_id.cs
deleted file mode 100644
index 5ea9d2138..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/PUT_todos2_id.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: PUT_todos2_id
- public class PUT_todos2_id : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public PUT_todos2_id(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- if (!int.TryParse((string)httpContext.GetRouteValue("id"), out var id))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // Reading the request body via JSON deserialization
- var (request, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- (var todo, var result1) = await WolverineWebApi.Samples.Update2Endpoint.LoadAsync(id, request, documentSession).ConfigureAwait(false);
- // Evaluate whether or not the execution should be stopped based on the IResult value
- if (result1 != null && !(result1 is Wolverine.Http.WolverineContinue))
- {
- await result1.ExecuteAsync(httpContext).ConfigureAwait(false);
- return;
- }
-
-
-
- // The actual HTTP request handler execution
- var todo_response = WolverineWebApi.Samples.Update2Endpoint.Put(id, request, todo, documentSession);
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Writing the response body to JSON because this was the first 'return variable' in the method signature
- await WriteJsonAsync(httpContext, todo_response);
- }
-
- }
-
- // END: PUT_todos2_id
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/PUT_todos_id.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/PUT_todos_id.cs
deleted file mode 100644
index 8d21297df..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/PUT_todos_id.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-//
-#pragma warning disable
-using Microsoft.AspNetCore.Routing;
-using System;
-using System.Linq;
-using Wolverine.Http;
-using Wolverine.Marten.Publishing;
-using Wolverine.Runtime;
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: PUT_todos_id
- public class PUT_todos_id : Wolverine.Http.HttpHandler
- {
- private readonly Wolverine.Http.WolverineHttpOptions _wolverineHttpOptions;
- private readonly Wolverine.Runtime.IWolverineRuntime _wolverineRuntime;
- private readonly Wolverine.Marten.Publishing.OutboxedSessionFactory _outboxedSessionFactory;
-
- public PUT_todos_id(Wolverine.Http.WolverineHttpOptions wolverineHttpOptions, Wolverine.Runtime.IWolverineRuntime wolverineRuntime, Wolverine.Marten.Publishing.OutboxedSessionFactory outboxedSessionFactory) : base(wolverineHttpOptions)
- {
- _wolverineHttpOptions = wolverineHttpOptions;
- _wolverineRuntime = wolverineRuntime;
- _outboxedSessionFactory = outboxedSessionFactory;
- }
-
-
-
- public override async System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpContext httpContext)
- {
- var messageContext = new Wolverine.Runtime.MessageContext(_wolverineRuntime);
- // Building the Marten session
- await using var documentSession = _outboxedSessionFactory.OpenSession(messageContext);
- if (!int.TryParse((string)httpContext.GetRouteValue("id"), out var id))
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // Reading the request body via JSON deserialization
- var (request, jsonContinue) = await ReadJsonAsync(httpContext);
- if (jsonContinue == Wolverine.HandlerContinuation.Stop) return;
- var todo = await WolverineWebApi.Samples.UpdateEndpoint.LoadAsync(id, documentSession).ConfigureAwait(false);
- // 404 if this required object is null
- if (todo == null)
- {
- httpContext.Response.StatusCode = 404;
- return;
- }
-
-
- // The actual HTTP request handler execution
- var storeDoc = WolverineWebApi.Samples.UpdateEndpoint.Put(id, request, todo);
-
- if (storeDoc != null)
- {
-
- // Placed by Wolverine's ISideEffect policy
- storeDoc.Execute(documentSession);
-
- }
-
-
- // Save all pending changes to this Marten session
- await documentSession.SaveChangesAsync(httpContext.RequestAborted).ConfigureAwait(false);
-
-
- // 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);
-
- // Wolverine automatically sets the status code to 204 for empty responses
- if (!httpContext.Response.HasStarted) httpContext.Response.StatusCode = 204;
- }
-
- }
-
- // END: PUT_todos_id
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/TelegramUpdatedHandler96651444.cs b/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/TelegramUpdatedHandler96651444.cs
deleted file mode 100644
index 155923aa9..000000000
--- a/src/Http/WolverineWebApi/Internal/Generated/WolverineHandlers/TelegramUpdatedHandler96651444.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-#pragma warning disable
-
-namespace Internal.Generated.WolverineHandlers
-{
- // START: TelegramUpdatedHandler96651444
- public class TelegramUpdatedHandler96651444 : Wolverine.Runtime.Handlers.MessageHandler
- {
-
-
- public override System.Threading.Tasks.Task HandleAsync(Wolverine.Runtime.MessageContext context, System.Threading.CancellationToken cancellation)
- {
- // The actual message body
- var telegramUpdated = (WolverineWebApi.Bugs.TelegramUpdated)context.Envelope.Message;
-
-
- // The actual message execution
- WolverineWebApi.Bugs.TelegramUpdatedHandler.Handle(telegramUpdated);
-
- return System.Threading.Tasks.Task.CompletedTask;
- }
-
- }
-
- // END: TelegramUpdatedHandler96651444
-
-
-}
-
diff --git a/src/Http/WolverineWebApi/Program.cs b/src/Http/WolverineWebApi/Program.cs
index 5f9ee0d74..a2df75db8 100644
--- a/src/Http/WolverineWebApi/Program.cs
+++ b/src/Http/WolverineWebApi/Program.cs
@@ -1,5 +1,6 @@
using IntegrationTests;
using JasperFx.CodeGeneration;
+using JasperFx.Core;
using Marten;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http.HttpResults;
@@ -78,6 +79,9 @@
// Need this.
builder.Host.UseWolverine(opts =>
{
+ // I'm speeding this up a lot for faster tests
+ opts.Durability.ScheduledJobPollingTime = 250.Milliseconds();
+
// Set up Entity Framework Core as the support
// for Wolverine's transactional middleware
opts.UseEntityFrameworkCoreTransactions();
diff --git a/src/Wolverine/Persistence/Sagas/SagaChain.cs b/src/Wolverine/Persistence/Sagas/SagaChain.cs
index 814269afc..50c84191b 100644
--- a/src/Wolverine/Persistence/Sagas/SagaChain.cs
+++ b/src/Wolverine/Persistence/Sagas/SagaChain.cs
@@ -43,6 +43,11 @@ public SagaChain(WolverineOptions options, IGrouping grouping
SagaIdMember = DetermineSagaIdMember(MessageType, SagaType);
}
+ protected override void tryAssignStickyEndpoints(HandlerCall handlerCall, WolverineOptions options)
+ {
+ // nope, don't do this with saga chains
+ }
+
public Type SagaType { get; }
public MemberInfo? SagaIdMember { get; set; }
diff --git a/src/Wolverine/Runtime/Handlers/HandlerChain.cs b/src/Wolverine/Runtime/Handlers/HandlerChain.cs
index 4ffc3432b..2e89b24ed 100644
--- a/src/Wolverine/Runtime/Handlers/HandlerChain.cs
+++ b/src/Wolverine/Runtime/Handlers/HandlerChain.cs
@@ -103,12 +103,13 @@ public HandlerChain(WolverineOptions options, IGrouping group
{
foreach (var handlerCall in grouping)
{
+ // ReSharper disable once VirtualMemberCallInConstructor
tryAssignStickyEndpoints(handlerCall, options);
}
}
}
-
- private void tryAssignStickyEndpoints(HandlerCall handlerCall, WolverineOptions options)
+
+ protected virtual void tryAssignStickyEndpoints(HandlerCall handlerCall, WolverineOptions options)
{
var endpoints = findStickyEndpoints(handlerCall, options).Distinct().ToArray();
if (endpoints.Any())