Skip to content

Commit da9a9e9

Browse files
update
1 parent d6ba4c1 commit da9a9e9

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

articles/azure-app-configuration/feature-management-dotnet-reference.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
title: .NET Feature Management
2+
title: .NET feature management - Azure App Configuration
33
description: Overview of .NET Feature Management library
4+
services: azure-app-configuration
45
author: zhiyuanliang-ms
56
ms.author: zhiyuanliang
67
ms.service: azure-app-configuration
@@ -187,7 +188,8 @@ The feature management library also supports the usage of the [`Microsoft Featur
187188
}
188189
```
189190

190-
**Note:** If the `feature_management` section can be found in the configuration, the `FeatureManagement` section is ignored.
191+
> [!NOTE]
192+
> If the `feature_management` section can be found in the configuration, the `FeatureManagement` section is ignored.
191193
192194
:::zone-end
193195

@@ -281,7 +283,8 @@ In the above example, `FeatureW` specifies a `requirement_type` of `All`, meanin
281283

282284
In previous versions, the primary schema for the feature management library was the [`.NET feature management schema`](https://github.com/microsoft/FeatureManagement-Dotnet/blob/main/schemas/FeatureManagement.Dotnet.v1.0.0.schema.json). Starting from v4.0.0, new features including variants and telemetry won't be supported for the .NET feature management schema.
283285

284-
**Note:** If a feature flag written with `Microsoft Feature Management schema` can be found in the configuration, any feature flag written with `.NET feature management schema` will be ignored.
286+
> [!NOTE]
287+
> If a feature flag written with `Microsoft Feature Management schema` can be found in the configuration, any feature flag written with `.NET feature management schema` will be ignored.
285288
286289
:::zone-end
287290

@@ -317,7 +320,8 @@ public class Startup
317320

318321
By default, the feature manager retrieves feature flag configuration from the "FeatureManagement" section of the .NET Core configuration data. If the "FeatureManagement" section doesn't exist, the configuration is considered empty.
319322

320-
**Note:** You can also specify that feature flag configuration should be retrieved from a different configuration section by passing the section to `AddFeatureManagement`. The following example tells the feature manager to read from a different section called "MyFeatureFlags" instead:
323+
> [!NOTE]
324+
> You can also specify that feature flag configuration should be retrieved from a different configuration section by passing the section to `AddFeatureManagement`. The following example tells the feature manager to read from a different section called "MyFeatureFlags" instead:
321325
322326
``` C#
323327
services.AddFeatureManagement(configuration.GetSection("MyFeatureFlags"));
@@ -467,11 +471,13 @@ The `<feature>` tag can reference multiple features/variants by specifying a com
467471
</feature>
468472
```
469473

470-
**Note:** if `variant` is specified, only *one* feature should be specified.
474+
> [!NOTE]
475+
> If `variant` is specified, only *one* feature should be specified.
471476
472477
By default, all listed features must be enabled for the feature tag to be rendered. This behavior can be overridden by adding the `requirement` attribute as seen in the example below.
473478

474-
**Note:** If a `requirement` of `And` is used in conjunction with `variant` an error will be thrown, as multiple variants can never be assigned.
479+
> [!NOTE]
480+
> If a `requirement` of `And` is used in conjunction with `variant` an error will be thrown, as multiple variants can never be assigned.
475481
476482
``` HTML+Razor
477483
<feature name="FeatureX,FeatureY" requirement="Any">
@@ -550,7 +556,8 @@ services.AddFeatureManagement()
550556

551557
Feature filters are registered by calling `AddFeatureFilter<T>` on the `IFeatureManagementBuilder` returned from `AddFeatureManagement`. These feature filters have access to the services that exist within the service collection that was used to add feature flags. Dependency injection can be used to retrieve these services.
552558

553-
**Note:** When filters are referenced in feature flag settings (for example, appsettings.json), the _Filter_ part of the type name should be omitted. For more information, see the [`Filter Alias Attribute`](#filter-alias-attribute) section.
559+
> [!NOTE]
560+
> When filters are referenced in feature flag settings (for example, appsettings.json), the _Filter_ part of the type name should be omitted. For more information, see the [`Filter Alias Attribute`](#filter-alias-attribute) section.
554561
555562
### Parameterized Feature Filters
556563

@@ -683,7 +690,8 @@ class AccountIdFilter : IContextualFeatureFilter<IAccountContext>
683690

684691
We can see that the `AccountIdFilter` requires an object that implements `IAccountContext` to be provided to be able to evaluate the state of a feature. When using this feature filter, the caller needs to make sure that the passed in object implements `IAccountContext`.
685692

686-
**Note:** Only a single feature filter interface can be implemented by a single type. Trying to add a feature filter that implements more than a single feature filter interface results in an `ArgumentException`.
693+
> [!NOTE]
694+
> Only a single feature filter interface can be implemented by a single type. Trying to add a feature filter that implements more than a single feature filter interface results in an `ArgumentException`.
687695
688696
### Using Contextual and Non-contextual Filters With the Same Alias
689697

@@ -745,7 +753,8 @@ This filter provides the capability to enable a feature based on a time window.
745753

746754
The time window can be configured to recur periodically. This can be useful for the scenarios where one may need to turn on a feature during a low or high traffic period of a day or certain days of a week. To expand the individual time window to recurring time windows, the recurrence rule should be specified in the `Recurrence` parameter.
747755

748-
**Note:** `Start` and `End` must be both specified to enable `Recurrence`.
756+
> [!NOTE]
757+
> `Start` and `End` must be both specified to enable `Recurrence`.
749758
750759
``` JavaScript
751760
"EnhancedPipeline": {
@@ -808,7 +817,8 @@ Depending on the type, certain fields of the `Pattern` are required, optional, o
808817
}
809818
```
810819

811-
**Note:** `Start` must be a valid first occurrence that fits the recurrence pattern. Additionally, the duration of the time window can't be longer than how frequently it occurs. For example, it's invalid to have a 25-hour time window recur every day.
820+
> [!NOTE]
821+
> `Start` must be a valid first occurrence that fits the recurrence pattern. Additionally, the duration of the time window can't be longer than how frequently it occurs. For example, it's invalid to have a 25-hour time window recur every day.
812822

813823
#### Recurrence Range
814824

@@ -1211,7 +1221,8 @@ If the feature is enabled, the feature manager will check the `user`, `group`, a
12111221
12121222
Allocation logic is similar to the [Microsoft.Targeting](#microsofttargeting) feature filter, but there are some parameters that are present in targeting that aren't in allocation, and vice versa. The outcomes of targeting and allocation aren't related.
12131223
1214-
**Note:** To allow allocating feature variants, you need to register `ITargetingContextAccessor`. This can be done by calling the `WithTargeting<T>` method.
1224+
> [!NOTE]
1225+
> To allow allocating feature variants, you need to register `ITargetingContextAccessor`. This can be done by calling the `WithTargeting<T>` method.
12151226
12161227
### Overriding Enabled State with a Variant
12171228
@@ -1371,7 +1382,8 @@ builder.services
13711382
.AddTelemetryPublisher<ApplicationInsightsTelemetryPublisher>();
13721383
```
13731384
1374-
**Note:** The base `Microsoft.FeatureManagement` package doesn't include this telemetry publisher.
1385+
> [!NOTE]
1386+
> The base `Microsoft.FeatureManagement` package doesn't include this telemetry publisher.
13751387

13761388
An example of its usage can be found in the [EvaluationDataToApplicationInsights](https://github.com/microsoft/FeatureManagement-Dotnet/tree/preview/examples/EvaluationDataToApplicationInsights) example.
13771389

0 commit comments

Comments
 (0)