Skip to content

Commit 801e76c

Browse files
Revert "Merge main to preview (#373)"
This reverts commit 9a7f2ff.
1 parent 9a7f2ff commit 801e76c

File tree

13 files changed

+325
-427
lines changed

13 files changed

+325
-427
lines changed

README.md

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ The feature management library supports appsettings.json as a feature flag sourc
9696

9797
The `FeatureManagement` section of the json document is used by convention to load feature flag settings. In the section above, we see that we have provided three different features. Features define their feature filters using the `EnabledFor` property. In the feature filters for `FeatureT` we see `AlwaysOn`. This feature filter is built-in and if specified will always enable the feature. The `AlwaysOn` feature filter does not require any configuration, so it only has the `Name` property. `FeatureU` has no filters in its `EnabledFor` property and thus will never be enabled. Any functionality that relies on this feature being enabled will not be accessible as long as the feature filters remain empty. However, as soon as a feature filter is added that enables the feature it can begin working. `FeatureV` specifies a feature filter named `TimeWindow`. This is an example of a configurable feature filter. We can see in the example that the filter has a `Parameters` property. This is used to configure the filter. In this case, the start and end times for the feature to be active are configured.
9898

99-
The detailed schema of the `FeatureManagement` section can be found [here](./schemas/FeatureManagement.Dotnet.v1.0.0.schema.json).
100-
10199
**Advanced:** The usage of colon ':' in feature flag names is forbidden.
102100

103101
#### On/Off Declaration
@@ -128,7 +126,7 @@ The `RequirementType` property of a feature flag is used to determine if the fil
128126

129127
A `RequirementType` of `All` changes the traversal. First, if there are no filters, the feature will be disabled. Then, the feature-filters are traversed until one of the filters decides that the feature should be disabled. If no filter indicates that the feature should be disabled, then it will be considered enabled.
130128

131-
``` JavaScript
129+
```
132130
"FeatureW": {
133131
"RequirementType": "All",
134132
"EnabledFor": [
@@ -156,7 +154,7 @@ In the above example, `FeatureW` specifies a `RequirementType` of `All`, meaning
156154
`Status` is an optional property of a feature flag that controls how a flag's enabled state is evaluated. By default, the status of a flag is `Conditional`, meaning that feature filters should be evaluated to determine if the flag is enabled. If the `Status` of a flag is set to `Disabled` then feature filters are not evaluated and the flag is always considered to be disabled.
157155

158156

159-
``` JavaScript
157+
```
160158
"FeatureX": {
161159
"Status": "Disabled",
162160
"EnabledFor": [
@@ -169,36 +167,6 @@ In the above example, `FeatureW` specifies a `RequirementType` of `All`, meaning
169167

170168
In this example, even though the `AlwaysOn` filter would normally always make the feature enabled, the `Status` property is set to `Disabled`, so this feature will always be disabled.
171169

172-
#### Microsoft Feature Management Schema
173-
174-
The feature management library also supports the usage of the [`Microsoft Feature Management schema`](https://github.com/Azure/AppConfiguration/blob/main/docs/FeatureManagement/FeatureManagement.v1.0.0.schema.json) to declare feature flags. This schema is language agnostic in origin and is supported by all Microsoft feature management libraries.
175-
176-
``` JavaScript
177-
{
178-
"feature_management": {
179-
"feature_flags": [
180-
{
181-
"id": "FeatureT",
182-
"enabled": true,
183-
"conditions": {
184-
"client_filters": [
185-
{
186-
"name": "Microsoft.TimeWindow",
187-
"parameters": {
188-
"Start": "Mon, 01 May 2023 13:59:59 GMT",
189-
"End": "Sat, 01 July 2023 00:00:00 GMT"
190-
}
191-
}
192-
]
193-
}
194-
}
195-
]
196-
}
197-
}
198-
```
199-
200-
**Note:** If the `feature_management` section can be found in the configuration, the `FeatureManagement` section will be ignored.
201-
202170
## Consumption
203171

204172
The basic form of feature management is checking if a feature flag is enabled and then performing actions based on the result. This is done through the `IFeatureManager`'s `IsEnabledAsync` method.

build/install-dotnet.ps1

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# Installs .NET 6, .NET 7 and .NET 8 for CI/CD environment
1+
# Installs .NET 6 and .NET 7 for CI/CD environment
22
# see: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script#examples
33

44
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
55

66
&([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Channel 6.0
77

8-
&([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Channel 7.0
9-
10-
&([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Channel 8.0
8+
&([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Channel 7.0

schemas/FeatureManagement.Dotnet.v1.0.0.schema.json

Lines changed: 0 additions & 112 deletions
This file was deleted.

src/Microsoft.FeatureManagement.AspNetCore/Microsoft.FeatureManagement.AspNetCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<Import Project="..\..\build\Versioning.props" />
1313

1414
<PropertyGroup>
15-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
15+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
1616
<SignAssembly>true</SignAssembly>
1717
<DelaySign>false</DelaySign>
1818
<AssemblyOriginatorKeyFile>..\..\build\Microsoft.FeatureManagement.snk</AssemblyOriginatorKeyFile>

0 commit comments

Comments
 (0)