Skip to content

Commit fd25157

Browse files
committed
refactor: remove the default option configure
remove default config since it's same as the default value for the option Signed-off-by: Weihan Li <[email protected]>
1 parent 5829d60 commit fd25157

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/OpenFeature.Hosting/OpenFeatureBuilderExtensions.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,7 @@ public static partial class OpenFeatureBuilderExtensions
1919
/// <returns>The <see cref="OpenFeatureBuilder"/> instance.</returns>
2020
public static OpenFeatureBuilder AddHostedFeatureLifecycle(this OpenFeatureBuilder builder, Action<FeatureLifecycleStateOptions>? configureOptions = null)
2121
{
22-
if (configureOptions == null)
23-
{
24-
builder.Services.Configure<FeatureLifecycleStateOptions>(cfg =>
25-
{
26-
cfg.StartState = FeatureStartState.Starting;
27-
cfg.StopState = FeatureStopState.Stopping;
28-
});
29-
}
30-
else
22+
if (configureOptions is not null)
3123
{
3224
builder.Services.Configure(configureOptions);
3325
}

0 commit comments

Comments
 (0)