Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: in-memory UpdateFlags to UpdateFlagsAsync #298

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/OpenFeature/Providers/Memory/InMemoryProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public InMemoryProvider(IDictionary<string, Flag>? flags = null)
}

/// <summary>
/// Updating provider flags configuration, replacing all flags.
/// Update provider flag configuration, replacing all flags.
/// </summary>
/// <param name="flags">the flags to use instead of the previous flags.</param>
public async Task UpdateFlags(IDictionary<string, Flag>? flags = null)
public async Task UpdateFlagsAsync(IDictionary<string, Flag>? flags = null)
{
var changed = this._flags.Keys.ToList();
if (flags == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public async Task GetString_ContextSensitive_ShouldEvaluateWithReasonAndVariant(
public async Task EmptyFlags_ShouldWork()
{
var provider = new InMemoryProvider();
await provider.UpdateFlags();
await provider.UpdateFlagsAsync();
Assert.Equal("InMemory", provider.GetMetadata().Name);
}

Expand Down Expand Up @@ -216,7 +216,7 @@ public async Task PutConfiguration_shouldUpdateConfigAndRunHandlers()
Assert.True(details.Value);

// update flags
await provider.UpdateFlags(new Dictionary<string, Flag>(){
await provider.UpdateFlagsAsync(new Dictionary<string, Flag>(){
{
"new-flag", new Flag<string>(
variants: new Dictionary<string, string>(){
Expand Down