Skip to content

Commit 64c6713

Browse files
Merge pull request #236606 from mcleanbyron/patch-1
Reintroduced links to Microsoft.FeatureManagement
2 parents a219bca + e101603 commit 64c6713

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/azure-app-configuration/use-feature-flags-dotnet-core.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The Feature Management libraries also manage feature flag lifecycles behind the
2626

2727
The [Add feature flags to an ASP.NET Core app Quickstart](./quickstart-feature-flag-aspnet-core.md) shows a simple example of how to use feature flags in an ASP.NET Core application. This tutorial shows additional setup options and capabilities of the Feature Management libraries. You can use the sample app created in the quickstart to try out the sample code shown in this tutorial.
2828

29-
For the ASP.NET Core feature management API reference documentation, see [Microsoft.FeatureManagement Namespace](https://www.nuget.org/packages/Microsoft.FeatureManagement/).
29+
For the ASP.NET Core feature management API reference documentation, see [Microsoft.FeatureManagement Namespace](/dotnet/api/microsoft.featuremanagement).
3030

3131
In this tutorial, you will learn how to:
3232

@@ -40,7 +40,7 @@ To access the .NET Core feature manager, your app must have references to the `M
4040

4141
The .NET Core feature manager is configured from the framework's native configuration system. As a result, you can define your application's feature flag settings by using any configuration source that .NET Core supports, including the local *appsettings.json* file or environment variables.
4242

43-
By default, the feature manager retrieves feature flag configuration from the `"FeatureManagement"` section of the .NET Core configuration data. To use the default configuration location, call the AddFeatureManagement method of the **IServiceCollection** passed into the **ConfigureServices** method of the **Startup** class.
43+
By default, the feature manager retrieves feature flag configuration from the `"FeatureManagement"` section of the .NET Core configuration data. To use the default configuration location, call the [AddFeatureManagement](/dotnet/api/microsoft.featuremanagement.servicecollectionextensions.addfeaturemanagement) method of the **IServiceCollection** passed into the **ConfigureServices** method of the **Startup** class.
4444

4545

4646
```csharp
@@ -72,7 +72,7 @@ public class Startup
7272
```
7373

7474

75-
If you use filters in your feature flags, you must include the [Microsoft.FeatureManagement.FeatureFilters](/dotnet/api/microsoft.azure.management.storsimple8000series.models.featurefilter) namespace and add a call to AddFeatureFilters specifying the type name of the filter you want to use as the generic type of the method. For more information on using feature filters to dynamically enable and disable functionality, see [Enable staged rollout of features for targeted audiences](./howto-targetingfilter-aspnet-core.md).
75+
If you use filters in your feature flags, you must include the [Microsoft.FeatureManagement.FeatureFilters](/dotnet/api/microsoft.featuremanagement.featurefilters) namespace and add a call to [AddFeatureFilter](/dotnet/api/microsoft.featuremanagement.ifeaturemanagementbuilder.addfeaturefilter) specifying the type name of the filter you want to use as the generic type of the method. For more information on using feature filters to dynamically enable and disable functionality, see [Enable staged rollout of features for targeted audiences](./howto-targetingfilter-aspnet-core.md).
7676

7777
The following example shows how to use a built-in feature filter called `PercentageFilter`:
7878

@@ -217,7 +217,7 @@ By convention, the `FeatureManagement` section of this JSON document is used for
217217

218218
## Use dependency injection to access IFeatureManager
219219

220-
For some operations, such as manually checking feature flag values, you need to get an instance of IFeatureManager. In ASP.NET Core MVC, you can access the feature manager `IFeatureManager` through dependency injection. In the following example, an argument of type `IFeatureManager` is added to the signature of the constructor for a controller. The runtime automatically resolves the reference and provides an of the interface when calling the constructor. If you're using an application template in which the controller already has one or more dependency injection arguments in the constructor, such as `ILogger`, you can just add `IFeatureManager` as an additional argument:
220+
For some operations, such as manually checking feature flag values, you need to get an instance of [IFeatureManager](/dotnet/api/microsoft.featuremanagement.ifeaturemanager). In ASP.NET Core MVC, you can access the feature manager `IFeatureManager` through dependency injection. In the following example, an argument of type `IFeatureManager` is added to the signature of the constructor for a controller. The runtime automatically resolves the reference and provides an of the interface when calling the constructor. If you're using an application template in which the controller already has one or more dependency injection arguments in the constructor, such as `ILogger`, you can just add `IFeatureManager` as an additional argument:
221221

222222
### [.NET 5.x](#tab/core5x)
223223

@@ -321,7 +321,7 @@ public IActionResult Index()
321321
}
322322
```
323323

324-
When an MVC controller or action is blocked because the controlling feature flag is *off*, a registered IDisabledFeaturesHandler interface is called. The default `IDisabledFeaturesHandler` interface returns a 404 status code to the client with no response body.
324+
When an MVC controller or action is blocked because the controlling feature flag is *off*, a registered [IDisabledFeaturesHandler](/dotnet/api/microsoft.featuremanagement.mvc.idisabledfeatureshandler) interface is called. The default `IDisabledFeaturesHandler` interface returns a 404 status code to the client with no response body.
325325

326326
## MVC views
327327

@@ -396,5 +396,5 @@ app.UseForFeature(featureName, appBuilder => {
396396
In this tutorial, you learned how to implement feature flags in your ASP.NET Core application by using the `Microsoft.FeatureManagement` libraries. For more information about feature management support in ASP.NET Core and App Configuration, see the following resources:
397397

398398
* [ASP.NET Core feature flag sample code](./quickstart-feature-flag-aspnet-core.md)
399-
* [Microsoft.FeatureManagement documentation](https://www.nuget.org/packages/Microsoft.FeatureManagement/)
399+
* [Microsoft.FeatureManagement documentation](/dotnet/api/microsoft.featuremanagement)
400400
* [Manage feature flags](./manage-feature-flags.md)

0 commit comments

Comments
 (0)