.NET SDK
Thread-safe client for evaluating feature flags in C# and .NET applications.
Installation
bash
dotnet add package FeatureSignalsRequirements: .NET 8.0+
Quick Start
csharp
using FeatureSignals;
var options = new ClientOptions { EnvKey = "production" };
using var client = new FeatureSignalsClient("fs_srv_your_api_key", options);
await client.WaitForReadyAsync();
var user = new EvalContext("user-123")
.WithAttribute("plan", "pro");
bool enabled = client.BoolVariation("new-feature", user, false);
Console.WriteLine($"Feature enabled: {enabled}");Variation Methods
csharp
bool enabled = client.BoolVariation("flag-key", ctx, false);
string value = client.StringVariation("banner-text", ctx, "default");
double limit = client.NumberVariation("rate-limit", ctx, 100.0);
T config = client.JsonVariation<T>("config", ctx, defaultConfig);ASP.NET Core Integration
csharp
builder.Services.AddSingleton<FeatureSignalsClient>(sp => {
var options = new ClientOptions { EnvKey = "production" };
return new FeatureSignalsClient(
builder.Configuration["FeatureSignals:ApiKey"]!, options);
});