Skip to content

Commit

Permalink
Use transient dependency injection by default
Browse files Browse the repository at this point in the history
  • Loading branch information
natenho committed Aug 25, 2024
1 parent 63f1a38 commit 0c1a5a0
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ private static IServiceCollection AddInternalServices(this IServiceCollection se
.AddTransient<ITemplateTransformer, TemplateTransformer>()

.AddTemplatesGenerating();

private static IServiceCollection AddChaosServices(this IServiceCollection services) =>
services
.AddSingleton<IChaosStrategy, ChaosStrategyBehavior>()
.AddSingleton<IChaosStrategy, ChaosStrategyException>()
.AddSingleton<IChaosStrategy, ChaosStrategyLatency>()
.AddSingleton<IChaosStrategy, ChaosStrategyResult>()
.AddSingleton<IChaosStrategy, ChaosStrategyTimeout>();
.AddTransient<IChaosStrategy, ChaosStrategyBehavior>()
.AddTransient<IChaosStrategy, ChaosStrategyException>()
.AddTransient<IChaosStrategy, ChaosStrategyLatency>()
.AddTransient<IChaosStrategy, ChaosStrategyResult>()
.AddTransient<IChaosStrategy, ChaosStrategyTimeout>();
}
}

0 comments on commit 0c1a5a0

Please sign in to comment.