CoreStone.SDK.Dotnet.Configuration
1.5.0
dotnet add package CoreStone.SDK.Dotnet.Configuration --version 1.5.0
NuGet\Install-Package CoreStone.SDK.Dotnet.Configuration -Version 1.5.0
<PackageReference Include="CoreStone.SDK.Dotnet.Configuration" Version="1.5.0" />
<PackageVersion Include="CoreStone.SDK.Dotnet.Configuration" Version="1.5.0" />
<PackageReference Include="CoreStone.SDK.Dotnet.Configuration" />
paket add CoreStone.SDK.Dotnet.Configuration --version 1.5.0
#r "nuget: CoreStone.SDK.Dotnet.Configuration, 1.5.0"
#:package CoreStone.SDK.Dotnet.Configuration@1.5.0
#addin nuget:?package=CoreStone.SDK.Dotnet.Configuration&version=1.5.0
#tool nuget:?package=CoreStone.SDK.Dotnet.Configuration&version=1.5.0
CoreStone.SDK.Dotnet.Configuration
Core HTTP client, token management, and shared types for the CoreStone .NET SDK.
This package is required by all other CoreStone SDK packages. Install it first, then add feature packages as needed.
Installation
dotnet add package CoreStone.SDK.Dotnet.Configuration
Quick Start
// Program.cs (ASP.NET Core or MAUI)
builder.Services.AddCoreStoneConfiguration(options =>
{
options.BaseUrl = "https://api.yourapp.com";
options.ProjectKey = "prj-xxxxxxxxxxxxxxxx"; // From CoreStone Management → Projects → API Integration
options.TimeoutSeconds = 30;
});
Then add feature packages on top:
dotnet add package CoreStone.SDK.Dotnet.Auth
dotnet add package CoreStone.SDK.Dotnet.Analytics
dotnet add package CoreStone.SDK.Dotnet.Support
dotnet add package CoreStone.SDK.Dotnet.UserManagement
dotnet add package CoreStone.SDK.Dotnet.MenuManagement
dotnet add package CoreStone.SDK.Dotnet.Announcement
Custom Token Store
By default tokens are kept in-memory (InMemoryTokenStore). For MAUI apps, provide a secure store:
// MAUI — tokens survive app restarts via Keychain / Android Keystore
builder.Services.AddCoreStoneConfiguration(
options => { options.BaseUrl = "..."; options.ProjectKey = "..."; },
tokenStore: new MySecureStorageTokenStore()); // implements ITokenStore
What's Included
| Type | Description |
|---|---|
CoreStoneSdkOptions |
Configuration options (BaseUrl, ProjectKey, Timeout) |
ITokenStore |
Abstraction for JWT token storage |
InMemoryTokenStore |
Default in-memory implementation |
CoreStoneHttpClient |
Shared HTTP client with auto token refresh on 401 |
ApiResponse<T> |
Envelope type matching the CoreStone API response shape |
CoreStoneException |
Typed exception with machine-readable Code property |
Error Handling
try
{
var me = await authClient.MeAsync();
}
catch (CoreStoneException ex) when (ex.Code == "UNAUTHORIZED")
{
// Token expired and refresh failed — redirect to login
}
catch (CoreStoneException ex) when (ex.Code == "NETWORK_ERROR")
{
// No internet connection
}
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Http (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.0)
- System.Net.Http.Json (>= 8.0.1)
- System.Text.Json (>= 8.0.5)
-
net9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Http (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.0)
- System.Net.Http.Json (>= 8.0.1)
- System.Text.Json (>= 8.0.5)
NuGet packages (9)
Showing the top 5 NuGet packages that depend on CoreStone.SDK.Dotnet.Configuration:
| Package | Downloads |
|---|---|
|
CoreStone.SDK.Dotnet.Auth
CoreStone SDK — authentication: register, login, refresh token, logout. |
|
|
CoreStone.SDK.Dotnet.Announcement
CoreStone SDK — announcements (fetch active announcements for the app). |
|
|
CoreStone.SDK.Dotnet.Analytics
CoreStone SDK — analytics event tracking with automatic batching and flush. |
|
|
CoreStone.SDK.Dotnet.MenuManagement
CoreStone SDK — app menu management (fetch dynamic menus). |
|
|
CoreStone.SDK.Dotnet.UserManagement
CoreStone SDK — user profile management (get, update, delete account). |
GitHub repositories
This package is not used by any popular GitHub repositories.