Cosmos.CrossCuttingConcerns.Preferences.Flagsmith
0.1.3
dotnet add package Cosmos.CrossCuttingConcerns.Preferences.Flagsmith --version 0.1.3
NuGet\Install-Package Cosmos.CrossCuttingConcerns.Preferences.Flagsmith -Version 0.1.3
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="Cosmos.CrossCuttingConcerns.Preferences.Flagsmith" Version="0.1.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cosmos.CrossCuttingConcerns.Preferences.Flagsmith" Version="0.1.3" />
<PackageReference Include="Cosmos.CrossCuttingConcerns.Preferences.Flagsmith" />
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 Cosmos.CrossCuttingConcerns.Preferences.Flagsmith --version 0.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Cosmos.CrossCuttingConcerns.Preferences.Flagsmith, 0.1.3"
#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 Cosmos.CrossCuttingConcerns.Preferences.Flagsmith@0.1.3
#: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=Cosmos.CrossCuttingConcerns.Preferences.Flagsmith&version=0.1.3
#tool nuget:?package=Cosmos.CrossCuttingConcerns.Preferences.Flagsmith&version=0.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Cosmos.CrossCuttingConcerns.Preferences.Flagsmith
Implementación Flagsmith de Cosmos.CrossCuttingConcerns.Preferences. Los microservicios de Cosmos dependen del paquete de abstracciones; este paquete sólo se referencia en el composition root.
Registro
// Program.cs (composition root)
using Cosmos.CrossCuttingConcerns.Preferences.Flagsmith;
builder.Services.AddFlagsmithPreferences(
environmentKey: builder.Configuration["Flagsmith:EnvironmentKey"]!,
apiUrl: builder.Configuration["Flagsmith:ApiUrl"]!);
Ajustes operativos opcionales (con defaults razonables):
builder.Services.AddFlagsmithPreferences(
environmentKey: key,
apiUrl: url,
enableLocalEvaluation: true, // default true
environmentRefreshIntervalSeconds: 60, // default 60
requestTimeoutSeconds: 5); // default 5
Comportamiento
- Local evaluation activado por defecto: el SDK hace pull periódico del entorno y evalúa flags en memoria. Mantiene baja la cuenta de requests contra Flagsmith.
- Identity / Tenant: el provider usa
Cosmos.MultiTenancy.TenantResolver.TenantIdcomo identifier de Flagsmith. La resolución del tenant es responsabilidad del host (hoy default"CosmosTenant"; se reemplaza conJwtTenantResolveru otros). - Conversión:
T = bool→IsFeatureEnabled. Para el resto,GetFeatureValue+Convert.ChangeType(primitivos) /Enum.Parse(enums) /Nullable<T>desenvuelto. - Fallback: si el cliente Flagsmith falla o la conversión no aplica, el provider devuelve el
defaultValuey loguea un warning estructurado.
Requisitos
- net10.0
Cosmos.MultiTenancy.TenantResolverregistrado en DI (viene embebido enCosmos.EventSourcing.CritterStack).
Deuda técnica conocida
Este paquete declara Cosmos.EventSourcing.CritterStack como dependencia únicamente para arrastrar Cosmos.MultiTenancy. Cuando Cosmos.MultiTenancy se publique como NuGet independiente, se migrará a esa dependencia directa.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Cosmos.CrossCuttingConcerns.Preferences (>= 0.1.0)
- Cosmos.EventSourcing.CritterStack (>= 0.1.11)
- Flagsmith (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.