https://github.com/devcyclehq/dotnet-server-sdk
DevCycle - .NET Server SDK
https://github.com/devcyclehq/dotnet-server-sdk
continuous-delivery continuous-deployment devcycle devops feature-flags feature-toggles openfeature
Last synced: about 1 month ago
JSON representation
DevCycle - .NET Server SDK
- Host: GitHub
- URL: https://github.com/devcyclehq/dotnet-server-sdk
- Owner: DevCycleHQ
- Created: 2022-05-02T23:03:10.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-11T19:40:25.000Z (about 2 months ago)
- Last Synced: 2025-03-11T20:32:54.664Z (about 2 months ago)
- Topics: continuous-delivery, continuous-deployment, devcycle, devops, feature-flags, feature-toggles, openfeature
- Language: C#
- Homepage: https://docs.devcycle.com/
- Size: 983 KB
- Stars: 7
- Watchers: 6
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DevCycle .NET Server SDK
Welcome to the DevCycle .NET Server SDK, which interfaces with a local bucketing library. This SDK requests config from DevCycle servers on DevCycleClient initialization.
All calls to the client will then perform local bucketing to determine if a user receives a specific variation.
Events are queued and flushed periodically in the background.
This version is compatible with .NET Standard 2.0 and utilizes more resources to perform local bucketing.## Installation
Download the SDK from Nuget - https://www.nuget.org/packages/DevCycle.SDK.Server.Local/## Getting Started
Use the example app `DevCycle.SDK.Server.Local.Example`. It will read your DevCycle SDK key from an environment variable `DEVCYCLE_SERVER_SDK_KEY`Your DevCycle SDK key can be found via [Environments & Keys Settings](https://www.devcycle.com/r/environments) on the DevCycle dashboard.
## Usage
To find usage documentation, visit our docs for [Local Bucketing](https://docs.devcycle.com/docs/sdk/server-side-sdks/dotnet-local).## Logging
The DevCycle SDK uses [Microsoft.Extensions.Logging](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-2.2) for logging and logs to **stdout** by default. You can customize the logging by providing your own ILoggingFactory when creating the `DevCycleLocalClient`.
```csharp
var loggerFactory = LoggerFactory.Create(builder =>
{
builder
.AddConsole() // Configure the logger to output to the console
.SetMinimumLevel(LogLevel.Information); // Set the minimum log level to Information
});client = new DevCycleLocalClientBuilder()
.SetSDKKey("")
.SetOptions(options ?? new DevCycleLocalOptions())
.SetOptions(new DevCycleLocalOptions(configPollingIntervalMs: 60000, eventFlushIntervalMs: 60000))
.SetLogger(loggerFactory)
.Build();
```