ConfigCat SDK for .NET. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
Aims to polish off some rough edges, eliminating a few inconsistencies and improve developer experience by adding nullable reference type annotations. Also make possible to cancel async operations.
Breaking changes:
Adds an optional CancellationToken parameter to the async methods of IConfigCatCache and IConfigCatClient.
Changes the return type of the following IConfigCatClient methods: GetAllKeys/GetAllKeysAsync (to IReadOnlyCollection<string>) and GetAllValues/GetAllValuesAsync (to IReadOnlyDictionary<string, object?>).
The ConfigCatClientOptions.Logger and ConfigCatClientOptions.PollingMode are no longer initialized to a default instance but use null to specify that the default implementation should be used.
Slightly changes the behavior of GetValue/GetValuesAsync and GetValueDetails/GetValuesDetailsAsync to fail early with exception when these methods are called with the wrong parameters:
ArgumentNullException when key is null.
ArgumentException when key is empty.
ArgumentException when T is not a supported type (string, bool, int, long, double or object - both nullable and non-nullable).
OperationCanceledException when cancellationToken is canceled during the operation (async methods only).
Requirement checklist (only if applicable)
[x] I have covered the applied changes with automated tests.
[x] I have executed the full automated test set against my changes.
[x] I have validated my changes against all supported platform versions.
Describe the purpose of your pull request
Aims to polish off some rough edges, eliminating a few inconsistencies and improve developer experience by adding nullable reference type annotations. Also make possible to cancel async operations.
Breaking changes:
CancellationToken
parameter to the async methods ofIConfigCatCache
andIConfigCatClient
.IConfigCatClient
methods:GetAllKeys
/GetAllKeysAsync
(toIReadOnlyCollection<string>
) andGetAllValues
/GetAllValuesAsync
(toIReadOnlyDictionary<string, object?>
).ConfigCatClientOptions.Logger
andConfigCatClientOptions.PollingMode
are no longer initialized to a default instance but usenull
to specify that the default implementation should be used.GetValue
/GetValuesAsync
andGetValueDetails
/GetValuesDetailsAsync
to fail early with exception when these methods are called with the wrong parameters:ArgumentNullException
whenkey
is null.ArgumentException
whenkey
is empty.ArgumentException
whenT
is not a supported type (string
,bool
,int
,long
,double
orobject
- both nullable and non-nullable).OperationCanceledException
whencancellationToken
is canceled during the operation (async methods only).Requirement checklist (only if applicable)