Featureflow 1.1.3
See the version list below for details.
dotnet add package Featureflow --version 1.1.3
NuGet\Install-Package Featureflow -Version 1.1.3
<PackageReference Include="Featureflow" Version="1.1.3" />
<PackageVersion Include="Featureflow" Version="1.1.3" />
<PackageReference Include="Featureflow" />
paket add Featureflow --version 1.1.3
#r "nuget: Featureflow, 1.1.3"
#:package Featureflow@1.1.3
#addin nuget:?package=Featureflow&version=1.1.3
#tool nuget:?package=Featureflow&version=1.1.3
Featureflow .NET SDK
Server-side .NET SDK for Featureflow feature management.
Compatible with .NET Framework 4.5+, and any runtime supporting .NET Standard 1.3 or 2.0 (.NET Core, .NET 5+, Mono, Xamarin).
Installation
dotnet add package Featureflow
or via the Package Manager console:
Install-Package Featureflow
Quick start
You'll need the server environment API key (sdk-srv-env-...) from the environment page of your Featureflow dashboard. It's a secret — keep it out of source control.
Create one client for the lifetime of your application:
using Featureflow.Client;
var client = FeatureflowClientFactory.Create("sdk-srv-env-YOUR_KEY");
Create blocks until the initial feature set has loaded, so evaluations are ready immediately. From an async context:
var client = await FeatureflowClientFactory.CreateAsync("sdk-srv-env-YOUR_KEY");
The client is thread-safe, keeps itself up to date in the background, and implements IDisposable — dispose it on shutdown. Register it as a singleton in your DI container:
builder.Services.AddSingleton<IFeatureflowClient>(
FeatureflowClientFactory.Create(builder.Configuration["Featureflow:ApiKey"]));
Then evaluate features anywhere:
if (client.Evaluate("my-feature-key", user).IsOn())
{
// feature code
}
Targeting users
Pass a User so targeting rules can match on who they are:
var user = new User("user-1234");
user.WithAttribute("tier", "gold");
user.WithAttribute("region", "sydney");
var result = client.Evaluate("my-feature-key", user).IsOn();
Attribute values may be a string, any numeric type, a DateTime, or a List<object> of those. When an attribute holds a list, a rule matches if it matches any value in the list.
Attributes are stored in Featureflow so you can build rules against them later. Use WithSessionAttribute instead for values that should be evaluated but not persisted:
user.WithSessionAttribute("dayofweek", 5);
For evaluations with no meaningful user (batch jobs, health checks):
client.Evaluate("my-feature-key", User.Anonymous()).IsOn();
Percentage rollouts hash the user's Id by default; set user.BucketKey if you want rollout buckets keyed by something else (e.g. an account id so a whole organisation gets the same variant).
Beyond on and off
Features can have any number of variants. Test for a specific one, or read the evaluated variant key directly:
if (client.Evaluate("checkout-flow", user).Is("v2"))
{
// show the v2 checkout
}
string variant = client.Evaluate("checkout-flow", user).Value(); // e.g. "v2"
EvaluateAll(user) returns a Dictionary<string, Evaluate> of every feature, which is handy for passing a full flag set to a front end.
Failover values
If a feature can't be found (typo'd key, network failure before first load), evaluation returns the failover variant — "off" by default. You can register features in code with explicit failover variants:
var client = FeatureflowClientFactory.Create("sdk-srv-env-YOUR_KEY", new List<Feature>
{
new Feature { Key = "checkout-flow", FailoverVariant = "v1" },
});
Configuration
Build a FeatureflowConfig for anything non-default:
var config = new FeatureflowConfigBuilder()
.WithGetFeaturesMethod(GetFeaturesMethod.Polling) // default: GetFeaturesMethod.Sse (streaming)
.WithConnectionTimeout(TimeSpan.FromSeconds(10)) // default: 30s
.Build();
var client = FeatureflowClientFactory.Create("sdk-srv-env-YOUR_KEY", config);
GetFeaturesMethod.Sse(default) holds a streaming connection open so rule changes apply in near real time.GetFeaturesMethod.Pollingperiodically re-fetches the feature set instead — use it where long-lived connections are impractical..WithOffline(true)makes no network calls at all: every evaluation returns the failover variant. Useful in unit tests and CI.
Reacting to changes
The client raises events when feature rules change:
client.FeatureUpdated += (sender, args) => logger.LogInformation("Feature {Key} updated", args.FeatureKey);
client.FeatureDeleted += (sender, args) => logger.LogInformation("Feature {Key} deleted", args.FeatureKey);
More
- Featureflow docs
- Changelog
- All Featureflow SDKs: github.com/featureflow
License
Apache-2.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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. |
| .NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard1.3 is compatible. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
| Universal Windows Platform | uap was computed. uap10.0 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5
- Newtonsoft.Json (>= 13.0.1)
- System.Net.Http (>= 4.3.4)
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 13.0.1)
- System.Net.Http (>= 4.3.4)
-
.NETStandard 2.0
- Newtonsoft.Json (>= 13.0.1)
- System.Net.Http (>= 4.3.4)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Featureflow:
| Package | Downloads |
|---|---|
|
FeatureFlagFramework
A C# Library that allows you to quickly pivot between Feature Flag Services such as LaunchDarkly and Featureflow |
|
|
FeatureFlagFramework.Clients.Featureflow
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.