-
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.
register built-in filter first & target on main branch
- Loading branch information
1 parent
ab6d10f
commit 089b4ce
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
src/Microsoft.FeatureManagement/EmptyTargetingContextAccessor.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,23 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
// | ||
using Microsoft.FeatureManagement.FeatureFilters; | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
|
||
namespace Microsoft.FeatureManagement | ||
{ | ||
internal class EmptyTargetingContextAccessor : ITargetingContextAccessor | ||
{ | ||
public ValueTask<TargetingContext> GetContextAsync() | ||
{ | ||
TargetingContext targetingContext = new TargetingContext | ||
{ | ||
UserId = "", | ||
Groups = new List<string>() | ||
}; | ||
|
||
return new ValueTask<TargetingContext>(targetingContext); | ||
} | ||
} | ||
} |
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