Skip to content
DocsTry Aspire
DocsTry

AspireGoFeatureFlagExtensions Methods

ClassMethods2 members
Provides extension methods for registering GO Feature Flag-related services in an Hosting.IHostApplicationBuilder.
AddGoFeatureFlagClient(IHostApplicationBuilder, string, Action<GoFeatureFlagClientSettings>)Section titled AddGoFeatureFlagClient(IHostApplicationBuilder, string, Action<GoFeatureFlagClientSettings>)extension
Registers GoFeatureFlagClientSettings as a singleton in the services provided by the builder.
public static class AspireGoFeatureFlagExtensions
{
public static void AddGoFeatureFlagClient(
this IHostApplicationBuilder builder,
string connectionName,
Action<GoFeatureFlagClientSettings>? configureSettings = null)
{
// ...
}
}
builderIHostApplicationBuilderThe Hosting.IHostApplicationBuilder to read config from and add services to.
connectionNamestringThe connection name to use to find a connection string.
configureSettingsAction<GoFeatureFlagClientSettings>optionalAn optional method that can be used for customizing the GOFeatureFlag.GOFeatureFlagProviderOptions. It's invoked after the settings are read from the configuration.
InvalidOperationExceptionIf required ConnectionString is not provided in configuration section
Reads the configuration from "Aspire:GoFeatureFlag:Client" section.
AddKeyedGoFeatureFlagClient(IHostApplicationBuilder, string, Action<GoFeatureFlagClientSettings>)Section titled AddKeyedGoFeatureFlagClient(IHostApplicationBuilder, string, Action<GoFeatureFlagClientSettings>)extension
Registers GoFeatureFlagClientSettings as a keyed singleton for the given name in the services provided by the builder.
public static class AspireGoFeatureFlagExtensions
{
public static void AddKeyedGoFeatureFlagClient(
this IHostApplicationBuilder builder,
string name,
Action<GoFeatureFlagClientSettings>? configureSettings = null)
{
// ...
}
}
builderIHostApplicationBuilderThe Hosting.IHostApplicationBuilder to read config from and add services to.
namestringThe connection name to use to find a connection string.
configureSettingsAction<GoFeatureFlagClientSettings>optionalAn optional method that can be used for customizing the GOFeatureFlag.GOFeatureFlagProviderOptions. It's invoked after the settings are read from the configuration.
InvalidOperationExceptionIf required ConnectionString is not provided in configuration section
Reads the configuration from "Aspire:GoFeatureFlag:Client" section.