Cosmos.CrossCuttingConcerns.Preferences
0.1.0
dotnet add package Cosmos.CrossCuttingConcerns.Preferences --version 0.1.0
NuGet\Install-Package Cosmos.CrossCuttingConcerns.Preferences -Version 0.1.0
<PackageReference Include="Cosmos.CrossCuttingConcerns.Preferences" Version="0.1.0" />
<PackageVersion Include="Cosmos.CrossCuttingConcerns.Preferences" Version="0.1.0" />
<PackageReference Include="Cosmos.CrossCuttingConcerns.Preferences" />
paket add Cosmos.CrossCuttingConcerns.Preferences --version 0.1.0
#r "nuget: Cosmos.CrossCuttingConcerns.Preferences, 0.1.0"
#:package Cosmos.CrossCuttingConcerns.Preferences@0.1.0
#addin nuget:?package=Cosmos.CrossCuttingConcerns.Preferences&version=0.1.0
#tool nuget:?package=Cosmos.CrossCuttingConcerns.Preferences&version=0.1.0
Cosmos.CrossCuttingConcerns.Preferences
Abstracciones para preferencias de tenant (feature flags + remote configuration) en productos Cosmos. Los microservicios consumen este paquete y quedan agnósticos del proveedor concreto (Flagsmith, ConfigCat, LaunchDarkly, etc.).
Uso
using Cosmos.CrossCuttingConcerns.Preferences;
public class PreferenciasRadicacion(IPreferencesProvider provider) : IPreferencias
{
public Task<bool> ConfirmacionAutomaticaAlRadicarAsync(CancellationToken ct)
=> provider.GetAsync("oxp.radicacion.confirmacion_automatica_al_radicar",
defaultValue: false, ct);
public Task<long> MontoMaximoAlertaCopAsync(CancellationToken ct)
=> provider.GetAsync("oxp.radicacion.monto_maximo_alerta_cop",
defaultValue: 30_000_000L, ct);
}
Tipos soportados
bool- Primitivos numéricos (
int,long,decimal,double, ...) string,DateTime- Enums (
Enum.Parsecase-insensitive) Nullable<T>de cualquiera de los anteriores
Contratos de error
Si el proveedor no puede resolver el valor (provider caído, clave desconocida, conversión imposible) el método devuelve el defaultValue. Los adaptadores son responsables de loguear el fallo.
Implementaciones
| 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. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Cosmos.CrossCuttingConcerns.Preferences:
| Package | Downloads |
|---|---|
|
Cosmos.CrossCuttingConcerns.Preferences.Flagsmith
Implementación Flagsmith para Cosmos.CrossCuttingConcerns.Preferences. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 0.1.0 | 178 | 4/20/2026 |