VOOZH about

URL: https://www.nuget.org/packages/FflagClient/

⇱ NuGet Gallery | FflagClient 0.7.0




👁 Image
FflagClient 0.7.0

dotnet add package FflagClient --version 0.7.0
 
 
NuGet\Install-Package FflagClient -Version 0.7.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FflagClient" Version="0.7.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FflagClient" Version="0.7.0" />
 
Directory.Packages.props
<PackageReference Include="FflagClient" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FflagClient --version 0.7.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FflagClient, 0.7.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FflagClient@0.7.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FflagClient&version=0.7.0
 
Install as a Cake Addin
#tool nuget:?package=FflagClient&version=0.7.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

This is a client-side C# client for FFlag. It evaluates requests right in the process on a client instead of making an HTTP call to FFlag every time a flag is requested. The benefit of it is a huge unmatched performance ( see benchmark)

How to use

  1. Install and register the package
dotnet add package FflagClient
var fflagUri = new Uri("http://localhost:9090");
builder.Services.AddFflagClient(fflagUri, options =>
{
 options.UpdateIntervalInSeconds = 20; // default is 60 seconds
 options.WatchedGroups.Add("this-app-name"); // at least one watched group is required
});
  1. Inject IFlagEvaluator into a constructor or a handler
IFlagEvaluator flagEvaluator
  1. Call the client
flagEvaluator.GetBool(flagName); // just a flag name
flagEvaluator.GetBool(flagName, userId); // flag name and entityId
flagEvaluator.GetBool(flagName, userId, Parameters.Add(countryCode).Add(age)); // with parameters

// other methods are available. Call these depending on the type of a flag
flagEvaluator.GetDouble(...)
flagEvaluator.GetLong(...)
flagEvaluator.GetString(...)

How it works

The client has a background job that queries flag configurations from FFlag every UpdateIntervalInSeconds. The server returns flags updated since the last time. The configuration is stored in memory. FFlag can have thousands of flags defined in it, but it's rare that an app needs all of them. Usually, only a subset of flags is queried from an app and the rest of the flags are meant for other apps.

To specify which flag configuration to keep in memory, provide a list of groups to which the flags should belong. A group is just a string that denotes a set of flags and is defined in FFlag UI. A flag can belong to multiple groups. A flag must have a group to be used in FflagClient.

A group can be a name of an app or a name of a UX flow if the flow goes through multiple services and is queried by all of them.

Product Versions Compatible and additional computed target framework versions.
.NET net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.0 3,285 11/26/2025
0.4.1 1,142 10/1/2025
0.4.0 1,957 4/25/2025
0.3.6 3,144 10/18/2024
0.3.5 248 10/18/2024
0.3.4 157 10/7/2024
0.3.3 152 10/7/2024
0.3.2 177 10/7/2024
0.3.1 161 10/6/2024
0.3.0 167 10/6/2024
0.2.4 211 10/5/2024
0.2.3 173 10/5/2024
0.2.2 162 10/5/2024
0.2.1 161 10/5/2024
0.2.0 212 10/4/2024