Skip to content

Commit 2a3024d

Browse files
authored
Rename RegisterFlows to RegisterFlow in IoC binding setup (#9)
1 parent 4fd4e32 commit 2a3024d

13 files changed

Lines changed: 19 additions & 19 deletions

File tree

Cleipnir.Tests.AspNet/IntegrationTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ IFunctionStore functionStore
7979
bindings(builder.Services);
8080
builder.Services.AddFlows(c => c
8181
.UseStore(functionStore)
82-
.RegisterFlows<TestFlow, string, string>()
82+
.RegisterFlow<TestFlow, string, string>()
8383
);
8484

8585
var app = builder.Build();

Cleipnir.Tests/Flows/OptionsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public async Task SimpleFlowCompletesSuccessfully()
2121
messagesDefaultMaxWaitForCompletion: TimeSpan.FromDays(1),
2222
watchdogCheckFrequency: TimeSpan.FromMilliseconds(100)
2323
))
24-
.RegisterFlows<OptionsTestWithDefaultProvidedOptionsFlow>()
24+
.RegisterFlow<OptionsTestWithDefaultProvidedOptionsFlow>()
2525
);
2626
serviceCollection.AddScoped<OptionsTestWithOverriddenOptionsFlow>();
2727
serviceCollection.AddTransient(sp => new Flows<OptionsTestWithOverriddenOptionsFlow>(

Cleipnir/AspNet/FlowsModule.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public FlowsConfigurator WithOptions(Func<IServiceProvider, Options> optionsFunc
6161
return this;
6262
}
6363

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

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

9292
return this;
9393
}
94-
public FlowsConfigurator RegisterFlows<TFlow, TParam, TResult>() where TFlow : Flow<TParam, TResult> where TParam : notnull
94+
public FlowsConfigurator RegisterFlow<TFlow, TParam, TResult>() where TFlow : Flow<TParam, TResult> where TParam : notnull
9595
{
9696
var added = FlowsTypes.Add(typeof(Flows<TFlow, TParam, TResult>));
9797
if (!added) return this;

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Secondly, add the following to the setup in `Program.cs` ([source code](https://
125125
```csharp
126126
builder.Services.AddFlows(c => c
127127
.UsePostgresStore(connectionString)
128-
.RegisterFlows<OrderFlow, Order>()
128+
.RegisterFlow<OrderFlow, Order>()
129129
);
130130
```
131131

Samples/Cleipnir.Sample.AspNet/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private static async Task Main(string[] args)
2828
builder.Services.AddFlows(c => c
2929
.UsePostgresStore(connectionString)
3030
.WithOptions(new Options(leaseLength: TimeSpan.FromSeconds(5)))
31-
.RegisterFlows<OrderFlow, Order>()
31+
.RegisterFlow<OrderFlow, Order>()
3232
);
3333

3434
// Add services to the container.

Samples/Cleipnir.Sample.Presentation.AspNet/Program.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ private static async Task Main(string[] args)
3333
builder.Services.AddFlows(c => c
3434
.UsePostgresStore(connectionString)
3535
.WithOptions(new Options(leaseLength: TimeSpan.FromSeconds(5), messagesDefaultMaxWaitForCompletion: TimeSpan.MaxValue))
36-
.RegisterFlows<OrderFlow, Order>()
37-
.RegisterFlows<BatchOrderFlow, List<Order>>()
38-
.RegisterFlows<SingleOrderFlow, Order, TransactionIdAndTrackAndTrace>()
39-
.RegisterFlows<InvoiceFlow, CustomerNumber>()
40-
.RegisterFlows<MessageDrivenOrderFlow, Order>()
36+
.RegisterFlow<OrderFlow, Order>()
37+
.RegisterFlow<BatchOrderFlow, List<Order>>()
38+
.RegisterFlow<SingleOrderFlow, Order, TransactionIdAndTrackAndTrace>()
39+
.RegisterFlow<InvoiceFlow, CustomerNumber>()
40+
.RegisterFlow<MessageDrivenOrderFlow, Order>()
4141
);
4242

4343
builder.Services.AddInMemoryBus();

Samples/Cleipnir.Sample.Presentation/C_NewsletterSender/Distributed/Example.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static async Task Perform()
2222
c => c
2323
.UseStore(store)
2424
.WithOptions(new Options(unhandledExceptionHandler: Console.WriteLine))
25-
.RegisterFlows<NewsletterParentFlow, MailAndRecipients>()
25+
.RegisterFlow<NewsletterParentFlow, MailAndRecipients>()
2626
);
2727
serviceCollection.AddScoped(sp => new NewsletterChildFlow(sp.GetRequiredService<Flows<NewsletterParentFlow, MailAndRecipients>>(), child));
2828
serviceCollection.AddTransient(sp => new Flows<NewsletterChildFlow, NewsletterChildWork>(

Samples/Cleipnir.Sample.Presentation/C_NewsletterSender/Example.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static async Task Perform()
2020
c => c
2121
.UseStore(store)
2222
.WithOptions(new Options(unhandledExceptionHandler: Console.WriteLine))
23-
.RegisterFlows<NewsletterFlow, MailAndRecipients>()
23+
.RegisterFlow<NewsletterFlow, MailAndRecipients>()
2424
);
2525

2626
var sp = serviceCollection.BuildServiceProvider();

ServiceBuses/MassTransit/Cleipnir.MassTransit.Console/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private static IHostBuilder CreateHostBuilder(string[] args) =>
3636
{
3737
services.AddFlows(c => c
3838
.UseInMemoryStore()
39-
.RegisterFlows<SimpleFlow>()
39+
.RegisterFlow<SimpleFlow>()
4040
);
4141

4242
services.AddMassTransit(x =>

ServiceBuses/MassTransit/Cleipnir.MassTransit.RabbitMq.Console/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private static IHostBuilder CreateHostBuilder(string[] args) =>
4545

4646
services.AddFlows(c => c
4747
.UseInMemoryStore()
48-
.RegisterFlows<OrderFlow, Order>()
48+
.RegisterFlow<OrderFlow, Order>()
4949
);
5050

5151
services.AddMassTransit(x =>

0 commit comments

Comments
 (0)