Skip to content
Docs Try Aspire

AspireGoFeatureFlagExtensions Methods

Class Methods 2 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)
{
// ...
}
}
builder IHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to.
connectionName string The connection name to use to find a connection string.
configureSettings Action<GoFeatureFlagClientSettings> optional An optional method that can be used for customizing the GOFeatureFlag.GoFeatureFlagProviderOptions. It's invoked after the settings are read from the configuration.
InvalidOperationException If 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)
{
// ...
}
}
builder IHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to.
name string The connection name to use to find a connection string.
configureSettings Action<GoFeatureFlagClientSettings> optional An optional method that can be used for customizing the GOFeatureFlag.GoFeatureFlagProviderOptions. It's invoked after the settings are read from the configuration.
InvalidOperationException If required ConnectionString is not provided in configuration section
Reads the configuration from "Aspire:GoFeatureFlag:Client" section.