diff --git a/build/Common.props b/build/Common.props
index b1857e0d..9f807b2c 100644
--- a/build/Common.props
+++ b/build/Common.props
@@ -6,6 +6,8 @@
true
EnableGenerateDocumentationFile
+ enable
+ true
diff --git a/src/OpenFeature/Api.cs b/src/OpenFeature/Api.cs
index af302e7e..6dc0f863 100644
--- a/src/OpenFeature/Api.cs
+++ b/src/OpenFeature/Api.cs
@@ -54,7 +54,7 @@ public void SetProvider(FeatureProvider featureProvider)
///
/// The provider cannot be set to null. Attempting to set the provider to null has no effect.
/// Implementation of
- public async Task SetProviderAsync(FeatureProvider featureProvider)
+ public async Task SetProviderAsync(FeatureProvider? featureProvider)
{
this._eventExecutor.RegisterDefaultFeatureProvider(featureProvider);
await this._repository.SetProvider(featureProvider, this.GetContext()).ConfigureAwait(false);
@@ -80,6 +80,10 @@ public void SetProvider(string clientName, FeatureProvider featureProvider)
/// Implementation of
public async Task SetProviderAsync(string clientName, FeatureProvider featureProvider)
{
+ if (string.IsNullOrWhiteSpace(clientName))
+ {
+ throw new ArgumentNullException(nameof(clientName));
+ }
this._eventExecutor.RegisterClientFeatureProvider(clientName, featureProvider);
await this._repository.SetProvider(clientName, featureProvider, this.GetContext()).ConfigureAwait(false);
}
@@ -138,8 +142,8 @@ public FeatureProvider GetProvider(string clientName)
/// Logger instance used by client
/// Context given to this client
///
- public FeatureClient GetClient(string name = null, string version = null, ILogger logger = null,
- EvaluationContext context = null) =>
+ public FeatureClient GetClient(string? name = null, string? version = null, ILogger? logger = null,
+ EvaluationContext? context = null) =>
new FeatureClient(name, version, logger, context);
///
@@ -200,7 +204,7 @@ public void AddHooks(IEnumerable hooks)
/// Sets the global
///
/// The to set
- public void SetContext(EvaluationContext context)
+ public void SetContext(EvaluationContext? context)
{
this._evaluationContextLock.EnterWriteLock();
try
diff --git a/src/OpenFeature/Error/FeatureProviderException.cs b/src/OpenFeature/Error/FeatureProviderException.cs
index df74afa4..b2c43dc7 100644
--- a/src/OpenFeature/Error/FeatureProviderException.cs
+++ b/src/OpenFeature/Error/FeatureProviderException.cs
@@ -20,7 +20,7 @@ public class FeatureProviderException : Exception
/// Common error types
/// Exception message
/// Optional inner exception
- public FeatureProviderException(ErrorType errorType, string message = null, Exception innerException = null)
+ public FeatureProviderException(ErrorType errorType, string? message = null, Exception? innerException = null)
: base(message, innerException)
{
this.ErrorType = errorType;
diff --git a/src/OpenFeature/Error/FlagNotFoundException.cs b/src/OpenFeature/Error/FlagNotFoundException.cs
index 6b8fb4bb..b1a5b64a 100644
--- a/src/OpenFeature/Error/FlagNotFoundException.cs
+++ b/src/OpenFeature/Error/FlagNotFoundException.cs
@@ -15,7 +15,7 @@ public class FlagNotFoundException : FeatureProviderException
///
/// Exception message
/// Optional inner exception
- public FlagNotFoundException(string message = null, Exception innerException = null)
+ public FlagNotFoundException(string? message = null, Exception? innerException = null)
: base(ErrorType.FlagNotFound, message, innerException)
{
}
diff --git a/src/OpenFeature/Error/GeneralException.cs b/src/OpenFeature/Error/GeneralException.cs
index 42e0fe73..4580ff31 100644
--- a/src/OpenFeature/Error/GeneralException.cs
+++ b/src/OpenFeature/Error/GeneralException.cs
@@ -15,7 +15,7 @@ public class GeneralException : FeatureProviderException
///
/// Exception message
/// Optional inner exception
- public GeneralException(string message = null, Exception innerException = null)
+ public GeneralException(string? message = null, Exception? innerException = null)
: base(ErrorType.General, message, innerException)
{
}
diff --git a/src/OpenFeature/Error/InvalidContextException.cs b/src/OpenFeature/Error/InvalidContextException.cs
index 6bcc8051..ffea8ab1 100644
--- a/src/OpenFeature/Error/InvalidContextException.cs
+++ b/src/OpenFeature/Error/InvalidContextException.cs
@@ -15,7 +15,7 @@ public class InvalidContextException : FeatureProviderException
///
/// Exception message
/// Optional inner exception
- public InvalidContextException(string message = null, Exception innerException = null)
+ public InvalidContextException(string? message = null, Exception? innerException = null)
: base(ErrorType.InvalidContext, message, innerException)
{
}
diff --git a/src/OpenFeature/Error/ParseErrorException.cs b/src/OpenFeature/Error/ParseErrorException.cs
index 7b3d21e9..81ded456 100644
--- a/src/OpenFeature/Error/ParseErrorException.cs
+++ b/src/OpenFeature/Error/ParseErrorException.cs
@@ -15,7 +15,7 @@ public class ParseErrorException : FeatureProviderException
///
/// Exception message
/// Optional inner exception
- public ParseErrorException(string message = null, Exception innerException = null)
+ public ParseErrorException(string? message = null, Exception? innerException = null)
: base(ErrorType.ParseError, message, innerException)
{
}
diff --git a/src/OpenFeature/Error/ProviderNotReadyException.cs b/src/OpenFeature/Error/ProviderNotReadyException.cs
index c3c8b5d0..ca509692 100644
--- a/src/OpenFeature/Error/ProviderNotReadyException.cs
+++ b/src/OpenFeature/Error/ProviderNotReadyException.cs
@@ -15,7 +15,7 @@ public class ProviderNotReadyException : FeatureProviderException
///
/// Exception message
/// Optional inner exception
- public ProviderNotReadyException(string message = null, Exception innerException = null)
+ public ProviderNotReadyException(string? message = null, Exception? innerException = null)
: base(ErrorType.ProviderNotReady, message, innerException)
{
}
diff --git a/src/OpenFeature/Error/TargetingKeyMissingException.cs b/src/OpenFeature/Error/TargetingKeyMissingException.cs
index 632cc791..71742413 100644
--- a/src/OpenFeature/Error/TargetingKeyMissingException.cs
+++ b/src/OpenFeature/Error/TargetingKeyMissingException.cs
@@ -15,7 +15,7 @@ public class TargetingKeyMissingException : FeatureProviderException
///
/// Exception message
/// Optional inner exception
- public TargetingKeyMissingException(string message = null, Exception innerException = null)
+ public TargetingKeyMissingException(string? message = null, Exception? innerException = null)
: base(ErrorType.TargetingKeyMissing, message, innerException)
{
}
diff --git a/src/OpenFeature/Error/TypeMismatchException.cs b/src/OpenFeature/Error/TypeMismatchException.cs
index 96c23872..83ff0cf3 100644
--- a/src/OpenFeature/Error/TypeMismatchException.cs
+++ b/src/OpenFeature/Error/TypeMismatchException.cs
@@ -15,7 +15,7 @@ public class TypeMismatchException : FeatureProviderException
///
/// Exception message
/// Optional inner exception
- public TypeMismatchException(string message = null, Exception innerException = null)
+ public TypeMismatchException(string? message = null, Exception? innerException = null)
: base(ErrorType.TypeMismatch, message, innerException)
{
}
diff --git a/src/OpenFeature/EventExecutor.cs b/src/OpenFeature/EventExecutor.cs
index 7bdfeb6e..a80c92d4 100644
--- a/src/OpenFeature/EventExecutor.cs
+++ b/src/OpenFeature/EventExecutor.cs
@@ -14,7 +14,7 @@ internal class EventExecutor : IAsyncDisposable
{
private readonly object _lockObj = new object();
public readonly Channel