Skip to content

Commit

Permalink
add null check and argumentnullexception for key in Register (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
amerjusupovic authored Dec 14, 2023
1 parent 5434fb3 commit e9a3aa5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public AzureAppConfigurationRefreshOptions Register(string key, bool refreshAll)
/// <param name="refreshAll">If true, a change in the value of this key refreshes all key-values being used by the configuration provider.</param>
public AzureAppConfigurationRefreshOptions Register(string key, string label = LabelFilter.Null, bool refreshAll = false)
{
if (string.IsNullOrEmpty(key))
{
throw new ArgumentNullException(nameof(key));
}

RefreshRegistrations.Add(new KeyValueWatcher
{
Key = key,
Expand Down

0 comments on commit e9a3aa5

Please sign in to comment.