Skip to content

Commit

Permalink
chore: in-memory UpdateFlags to UpdateFlagsAsync (#298)
Browse files Browse the repository at this point in the history
I was doing an audit before the release and found this one method could
use a suffix update.

Signed-off-by: Todd Baert <[email protected]>
  • Loading branch information
toddbaert authored Aug 21, 2024
1 parent bb4f352 commit 390205a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 390205a

Please sign in to comment.