|
1 | 1 | ---
|
2 |
| -title: .NET Feature Management |
| 2 | +title: .NET feature management - Azure App Configuration |
3 | 3 | description: Overview of .NET Feature Management library
|
| 4 | +services: azure-app-configuration |
4 | 5 | author: zhiyuanliang-ms
|
5 | 6 | ms.author: zhiyuanliang
|
6 | 7 | ms.service: azure-app-configuration
|
@@ -187,7 +188,8 @@ The feature management library also supports the usage of the [`Microsoft Featur
|
187 | 188 | }
|
188 | 189 | ```
|
189 | 190 |
|
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. |
191 | 193 |
|
192 | 194 | :::zone-end
|
193 | 195 |
|
@@ -281,7 +283,8 @@ In the above example, `FeatureW` specifies a `requirement_type` of `All`, meanin
|
281 | 283 |
|
282 | 284 | 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.
|
283 | 285 |
|
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. |
285 | 288 |
|
286 | 289 | :::zone-end
|
287 | 290 |
|
@@ -317,7 +320,8 @@ public class Startup
|
317 | 320 |
|
318 | 321 | 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.
|
319 | 322 |
|
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: |
321 | 325 |
|
322 | 326 | ``` C#
|
323 | 327 | services.AddFeatureManagement(configuration.GetSection("MyFeatureFlags"));
|
@@ -467,11 +471,13 @@ The `<feature>` tag can reference multiple features/variants by specifying a com
|
467 | 471 | </feature>
|
468 | 472 | ```
|
469 | 473 |
|
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. |
471 | 476 |
|
472 | 477 | 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.
|
473 | 478 |
|
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. |
475 | 481 |
|
476 | 482 | ``` HTML+Razor
|
477 | 483 | <feature name="FeatureX,FeatureY" requirement="Any">
|
@@ -550,7 +556,8 @@ services.AddFeatureManagement()
|
550 | 556 |
|
551 | 557 | 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.
|
552 | 558 |
|
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. |
554 | 561 |
|
555 | 562 | ### Parameterized Feature Filters
|
556 | 563 |
|
@@ -683,7 +690,8 @@ class AccountIdFilter : IContextualFeatureFilter<IAccountContext>
|
683 | 690 |
|
684 | 691 | 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`.
|
685 | 692 |
|
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`. |
687 | 695 |
|
688 | 696 | ### Using Contextual and Non-contextual Filters With the Same Alias
|
689 | 697 |
|
@@ -745,7 +753,8 @@ This filter provides the capability to enable a feature based on a time window.
|
745 | 753 |
|
746 | 754 | 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.
|
747 | 755 |
|
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`. |
749 | 758 |
|
750 | 759 | ``` JavaScript
|
751 | 760 | "EnhancedPipeline": {
|
@@ -808,7 +817,8 @@ Depending on the type, certain fields of the `Pattern` are required, optional, o
|
808 | 817 | }
|
809 | 818 | ```
|
810 | 819 |
|
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. |
812 | 822 |
|
813 | 823 | #### Recurrence Range
|
814 | 824 |
|
@@ -1211,7 +1221,8 @@ If the feature is enabled, the feature manager will check the `user`, `group`, a
|
1211 | 1221 |
|
1212 | 1222 | 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.
|
1213 | 1223 |
|
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. |
1215 | 1226 |
|
1216 | 1227 | ### Overriding Enabled State with a Variant
|
1217 | 1228 |
|
@@ -1371,7 +1382,8 @@ builder.services
|
1371 | 1382 | .AddTelemetryPublisher<ApplicationInsightsTelemetryPublisher>();
|
1372 | 1383 | ```
|
1373 | 1384 |
|
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. |
1375 | 1387 |
|
1376 | 1388 | An example of its usage can be found in the [EvaluationDataToApplicationInsights](https://github.com/microsoft/FeatureManagement-Dotnet/tree/preview/examples/EvaluationDataToApplicationInsights) example.
|
1377 | 1389 |
|
|
0 commit comments