Skip to content

Commit 8d59200

Browse files
committed
reset examples changes
1 parent d2543ea commit 8d59200

File tree

3 files changed

+4
-68
lines changed

3 files changed

+4
-68
lines changed

examples/FeatureFlagDemo/Controllers/HomeController.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,16 @@ namespace FeatureFlagDemo.Controllers
1414
{
1515
public class HomeController : Controller
1616
{
17-
private readonly IVariantFeatureManager _featureManager;
17+
private readonly IFeatureManager _featureManager;
1818

19-
public HomeController(IVariantFeatureManagerSnapshot featureSnapshot)
19+
public HomeController(IFeatureManagerSnapshot featureSnapshot)
2020
{
2121
_featureManager = featureSnapshot;
2222
}
2323

2424
[FeatureGate(MyFeatureFlags.Home)]
25-
public async Task<IActionResult> Index()
25+
public Task<IActionResult> Index()
2626
{
27-
Variant test = await _featureManager.GetVariantAsync(nameof(MyFeatureFlags.Banner), CancellationToken.None);
28-
string x = test.Configuration["Size"];
29-
string y = test.Configuration.Value;
30-
bool isEnabled = await _featureManager.IsEnabledAsync(nameof(MyFeatureFlags.Banner), CancellationToken.None);
3127
return View();
3228
}
3329

examples/FeatureFlagDemo/MyFeatureFlags.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ public enum MyFeatureFlags
1111
Beta,
1212
CustomViewData,
1313
ContentEnhancement,
14-
EnhancedPipeline,
15-
Banner
14+
EnhancedPipeline
1615
}
1716
}

examples/FeatureFlagDemo/appsettings.json

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -66,65 +66,6 @@
6666
}
6767
}
6868
]
69-
},
70-
"Banner": {
71-
"Allocation": {
72-
"DefaultWhenEnabled": "Small",
73-
"DefaultWhenDisabled": "Small",
74-
"User": [
75-
{
76-
"Variant": "Big",
77-
"Users": [
78-
"Marsha"
79-
]
80-
}
81-
],
82-
"Group": [
83-
{
84-
"Variant": "Big",
85-
"Groups": [
86-
"Ring1"
87-
]
88-
}
89-
],
90-
"Percentile": [
91-
{
92-
"Variant": "Big",
93-
"From": 0,
94-
"To": 0
95-
}
96-
],
97-
"Seed": 13973240
98-
},
99-
"Variants": [
100-
{
101-
"Name": "Big",
102-
"ConfigurationReference": "ShoppingCart:Big",
103-
"StatusOverride": "Disabled"
104-
},
105-
{
106-
"Name": "Small",
107-
"ConfigurationValue": "300px"
108-
}
109-
],
110-
"EnabledFor": [
111-
{
112-
"Name": "Microsoft.Percentage",
113-
"Parameters": {
114-
"Value": 100
115-
}
116-
}
117-
]
118-
}
119-
},
120-
"ShoppingCart": {
121-
"Big": {
122-
"Size": 400,
123-
"Color": "green"
124-
},
125-
"Small": {
126-
"Size": 150,
127-
"Color": "gray"
12869
}
12970
}
13071
}

0 commit comments

Comments
 (0)