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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cleipnir.Tests.AspNet/IntegrationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ IFunctionStore functionStore
bindings(builder.Services);
builder.Services.AddFlows(c => c
.UseStore(functionStore)
.RegisterFlows<TestFlow, string, string>()
.RegisterFlow<TestFlow, string, string>()
);

var app = builder.Build();
Expand Down
2 changes: 1 addition & 1 deletion Cleipnir.Tests/Flows/OptionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public async Task SimpleFlowCompletesSuccessfully()
messagesDefaultMaxWaitForCompletion: TimeSpan.FromDays(1),
watchdogCheckFrequency: TimeSpan.FromMilliseconds(100)
))
.RegisterFlows<OptionsTestWithDefaultProvidedOptionsFlow>()
.RegisterFlow<OptionsTestWithDefaultProvidedOptionsFlow>()
);
serviceCollection.AddScoped<OptionsTestWithOverriddenOptionsFlow>();
serviceCollection.AddTransient(sp => new Flows<OptionsTestWithOverriddenOptionsFlow>(
Expand Down
6 changes: 3 additions & 3 deletions Cleipnir/AspNet/FlowsModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public FlowsConfigurator WithOptions(Func<IServiceProvider, Options> optionsFunc
return this;
}

public FlowsConfigurator RegisterFlows<TFlow>() where TFlow : Flow
public FlowsConfigurator RegisterFlow<TFlow>() where TFlow : Flow
{
var added = FlowsTypes.Add(typeof(Flows<TFlow>));
if (!added) return this;
Expand All @@ -76,7 +76,7 @@ public FlowsConfigurator RegisterFlows<TFlow>() where TFlow : Flow

return this;
}
public FlowsConfigurator RegisterFlows<TFlow, TParam>() where TFlow : Flow<TParam> where TParam : notnull
public FlowsConfigurator RegisterFlow<TFlow, TParam>() where TFlow : Flow<TParam> where TParam : notnull
{
var added = FlowsTypes.Add(typeof(Flows<TFlow, TParam>));
if (!added) return this;
Expand All @@ -91,7 +91,7 @@ public FlowsConfigurator RegisterFlows<TFlow, TParam>() where TFlow : Flow<TPara

return this;
}
public FlowsConfigurator RegisterFlows<TFlow, TParam, TResult>() where TFlow : Flow<TParam, TResult> where TParam : notnull
public FlowsConfigurator RegisterFlow<TFlow, TParam, TResult>() where TFlow : Flow<TParam, TResult> where TParam : notnull
{
var added = FlowsTypes.Add(typeof(Flows<TFlow, TParam, TResult>));
if (!added) return this;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Secondly, add the following to the setup in `Program.cs` ([source code](https://
```csharp
builder.Services.AddFlows(c => c
.UsePostgresStore(connectionString)
.RegisterFlows<OrderFlow, Order>()
.RegisterFlow<OrderFlow, Order>()
);
```

Expand Down
2 changes: 1 addition & 1 deletion Samples/Cleipnir.Sample.AspNet/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private static async Task Main(string[] args)
builder.Services.AddFlows(c => c
.UsePostgresStore(connectionString)
.WithOptions(new Options(leaseLength: TimeSpan.FromSeconds(5)))
.RegisterFlows<OrderFlow, Order>()
.RegisterFlow<OrderFlow, Order>()
);

// Add services to the container.
Expand Down
10 changes: 5 additions & 5 deletions Samples/Cleipnir.Sample.Presentation.AspNet/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ private static async Task Main(string[] args)
builder.Services.AddFlows(c => c
.UsePostgresStore(connectionString)
.WithOptions(new Options(leaseLength: TimeSpan.FromSeconds(5), messagesDefaultMaxWaitForCompletion: TimeSpan.MaxValue))
.RegisterFlows<OrderFlow, Order>()
.RegisterFlows<BatchOrderFlow, List<Order>>()
.RegisterFlows<SingleOrderFlow, Order, TransactionIdAndTrackAndTrace>()
.RegisterFlows<InvoiceFlow, CustomerNumber>()
.RegisterFlows<MessageDrivenOrderFlow, Order>()
.RegisterFlow<OrderFlow, Order>()
.RegisterFlow<BatchOrderFlow, List<Order>>()
.RegisterFlow<SingleOrderFlow, Order, TransactionIdAndTrackAndTrace>()
.RegisterFlow<InvoiceFlow, CustomerNumber>()
.RegisterFlow<MessageDrivenOrderFlow, Order>()
);

builder.Services.AddInMemoryBus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static async Task Perform()
c => c
.UseStore(store)
.WithOptions(new Options(unhandledExceptionHandler: Console.WriteLine))
.RegisterFlows<NewsletterParentFlow, MailAndRecipients>()
.RegisterFlow<NewsletterParentFlow, MailAndRecipients>()
);
serviceCollection.AddScoped(sp => new NewsletterChildFlow(sp.GetRequiredService<Flows<NewsletterParentFlow, MailAndRecipients>>(), child));
serviceCollection.AddTransient(sp => new Flows<NewsletterChildFlow, NewsletterChildWork>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static async Task Perform()
c => c
.UseStore(store)
.WithOptions(new Options(unhandledExceptionHandler: Console.WriteLine))
.RegisterFlows<NewsletterFlow, MailAndRecipients>()
.RegisterFlow<NewsletterFlow, MailAndRecipients>()
);

var sp = serviceCollection.BuildServiceProvider();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private static IHostBuilder CreateHostBuilder(string[] args) =>
{
services.AddFlows(c => c
.UseInMemoryStore()
.RegisterFlows<SimpleFlow>()
.RegisterFlow<SimpleFlow>()
);

services.AddMassTransit(x =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private static IHostBuilder CreateHostBuilder(string[] args) =>

services.AddFlows(c => c
.UseInMemoryStore()
.RegisterFlows<OrderFlow, Order>()
.RegisterFlow<OrderFlow, Order>()
);

services.AddMassTransit(x =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private static IHostBuilder CreateHostBuilder(string[] args) =>
{
services.AddFlows(c => c
.UseInMemoryStore()
.RegisterFlows<SimpleFlow>()
.RegisterFlow<SimpleFlow>()
);

}).UseNServiceBus(_ =>
Expand Down
2 changes: 1 addition & 1 deletion ServiceBuses/Rebus/Cleipnir.Rebus.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private static IHostBuilder CreateHostBuilder(string[] args) =>
{
services.AddFlows(c => c
.UseInMemoryStore()
.RegisterFlows<SimpleFlow>()
.RegisterFlow<SimpleFlow>()
);

services.AutoRegisterHandlersFromAssembly(typeof(Program).Assembly);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private static IHostBuilder CreateHostBuilder(string[] args) =>
{
services.AddFlows(c => c
.UseInMemoryStore()
.RegisterFlows<SimpleFlow>()
.RegisterFlow<SimpleFlow>()
);
})
.UseWolverine();
Expand Down