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
                    
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" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cosmos.CrossCuttingConcerns.Preferences" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Cosmos.CrossCuttingConcerns.Preferences" />
                    
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 Cosmos.CrossCuttingConcerns.Preferences --version 0.1.0
                    
#r "nuget: Cosmos.CrossCuttingConcerns.Preferences, 0.1.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 Cosmos.CrossCuttingConcerns.Preferences@0.1.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=Cosmos.CrossCuttingConcerns.Preferences&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Cosmos.CrossCuttingConcerns.Preferences&version=0.1.0
                    
Install as a Cake Tool

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.Parse case-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 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

    • 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 0.1.0 is deprecated because it is no longer maintained.