Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/FeatureFlagDemo/FeatureFlagDemo.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="7.3.0" />
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="8.4.0" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 7 additions & 0 deletions examples/FeatureFlagDemo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ public static IWebHostBuilder CreateWebHostBuilder(string[] args)
o.UseFeatureFlags();
});
}
else
{
//
// Disable Azure App Configuration provider when connection string is not configured
// This enables feature flag retrieval solely from appsettings.json
Environment.SetEnvironmentVariable("AZURE_APP_CONFIGURATION_PROVIDER_DISABLED", "true");
}
})
.UseStartup<Startup>();
}
Expand Down
2 changes: 2 additions & 0 deletions examples/FeatureFlagDemo/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public void ConfigureServices(IServiceCollection services)
.WithTargeting()
.UseDisabledFeaturesHandler(new FeatureNotEnabledDisabledHandler());

services.AddAzureAppConfiguration();

services.AddMvc(o =>
{
o.Filters.AddForFeature<ThirdPartyActionFilter>(MyFeatureFlags.EnhancedPipeline);
Expand Down
Loading