Skip to content

Commit

Permalink
Rename UseFlows into idiomatic AddFlows instead
Browse files Browse the repository at this point in the history
  • Loading branch information
stidsborg committed Jun 15, 2024
1 parent a5b6fe6 commit 36f9d75
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cleipnir.Flows.Tests.AspNet/IntegrationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ IFunctionStore functionStore
var builder = WebApplication.CreateBuilder();

bindings(builder.Services);
builder.Services.UseFlows(c => c
builder.Services.AddFlows(c => c
.UseStore(functionStore)
.RegisterFlowsAutomatically()
);
Expand Down
2 changes: 1 addition & 1 deletion Cleipnir.Flows/AspNet/FlowsModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Cleipnir.Flows.AspNet;

public static class FlowsModule
{
public static IServiceCollection UseFlows(this IServiceCollection services, Func<FlowsConfigurator, FlowsConfigurator> configure)
public static IServiceCollection AddFlows(this IServiceCollection services, Func<FlowsConfigurator, FlowsConfigurator> configure)
{
var configurator = new FlowsConfigurator(services);
configure(configurator);
Expand Down
2 changes: 1 addition & 1 deletion Samples/Cleipnir.Flows.Sample.AspNet/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private static async Task Main(string[] args)
const string connectionString = "Server=localhost;Port=5432;Userid=postgres;Password=Pa55word!;Database=flows;";

//await DatabaseHelper.RecreateDatabase(connectionString); //use to create db initially or clean existing state in database
builder.Services.UseFlows(c => c
builder.Services.AddFlows(c => c
.UsePostgresSqlStore(connectionString)
.WithOptions(new Options(crashedCheckFrequency: TimeSpan.FromSeconds(5)))
.RegisterFlowsAutomatically()
Expand Down
2 changes: 1 addition & 1 deletion ServiceBuses/Cleipnir.Flows.Rebus.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureServices((_, services) =>
{
services.UseFlows(c => c.UseInMemoryStore().RegisterFlowsAutomatically());
services.AddFlows(c => c.UseInMemoryStore().RegisterFlowsAutomatically());
services.AddRebus(
configure => configure
.Transport(t => t.UseInMemoryTransport(new InMemNetwork(), "who cares"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public async Task SunshineScenario()
.ConfigureServices((_, services) =>
{
services.AddHostedService<TestHostedService>();
services.UseFlows(c => c
services.AddFlows(c => c
.UseInMemoryStore()
.RegisterFlow<RebusTestFlow, RebusTestFlows>());
services.AddRebus(
Expand Down

0 comments on commit 36f9d75

Please sign in to comment.