A collection of interfaces, classes and extension methods that are commonly used when writing API client libraries.
Supported versions
- .Net 8
- .Net Framework 4.8.1
IIsValid, provides a property for indicating whether a instance is valid.UserCredential,ApiKeyCredential, provides properties for commonly used credential types.IGetCredential<TKey>,IGetCredential<TKey, TCredential>, provides methods for retrieving a credential using a key.ISetCredential<TKey, TCredential>, provides methods setting a credential using a key.TrySetCredentialAsyncextension method for safely setting a credential.
ApiException, provides properties for HTTP status codes, data and providers.GetErrorMessagefor retrieving a human-readable message from aHttpStatusCode.
GetTenantAsync, provides a method for retriving a tenant.GetTenantOrDefaultAsyncextension methods for retrieving a tenant.
KeyedSemaphoreSlim<K>, provides a thread-safe keyedSempahoreSlim, backed by aConcurrentDictionary<K, SemaphoreSlim>.