-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add negate property for FeatureGateAttriburte * update * revert change * add testcases * fix lint
- Loading branch information
1 parent
57c8f24
commit 325271b
Showing
7 changed files
with
147 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/Tests.FeatureManagement.AspNetCore/Pages/RazorTestAllNegate.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@page | ||
@model RazorTestAllNegateModel |
18 changes: 18 additions & 0 deletions
18
tests/Tests.FeatureManagement.AspNetCore/Pages/RazorTestAllNegate.cshtml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
// | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
using Microsoft.FeatureManagement.Mvc; | ||
|
||
namespace Tests.FeatureManagement.AspNetCore.Pages | ||
{ | ||
[FeatureGate(negate: true, Features.ConditionalFeature, Features.ConditionalFeature2)] | ||
public class RazorTestAllNegateModel : PageModel | ||
{ | ||
public IActionResult OnGet() | ||
{ | ||
return new OkResult(); | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
tests/Tests.FeatureManagement.AspNetCore/Pages/RazorTestAnyNegate.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@page | ||
@model Tests.FeatureManagement.AspNetCore.Pages.RazorTestAnyNegateModel | ||
@{ | ||
} |
19 changes: 19 additions & 0 deletions
19
tests/Tests.FeatureManagement.AspNetCore/Pages/RazorTestAnyNegate.cshtml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
// | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
using Microsoft.FeatureManagement; | ||
using Microsoft.FeatureManagement.Mvc; | ||
|
||
namespace Tests.FeatureManagement.AspNetCore.Pages | ||
{ | ||
[FeatureGate(requirementType: RequirementType.Any, negate: true, Features.ConditionalFeature, Features.ConditionalFeature2)] | ||
public class RazorTestAnyNegateModel : PageModel | ||
{ | ||
public IActionResult OnGet() | ||
{ | ||
return new OkResult(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters