Cosmos.Types.Abstractions 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Cosmos.Types.Abstractions --version 1.1.0
                    
NuGet\Install-Package Cosmos.Types.Abstractions -Version 1.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.Types.Abstractions" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cosmos.Types.Abstractions" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Cosmos.Types.Abstractions" />
                    
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.Types.Abstractions --version 1.1.0
                    
#r "nuget: Cosmos.Types.Abstractions, 1.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.Types.Abstractions@1.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.Types.Abstractions&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Cosmos.Types.Abstractions&version=1.1.0
                    
Install as a Cake Tool

Cosmos.Types.Abstractions

NuGet

Kernel compartido (sin datos) de los tipos del ERP Cosmos. Define el contrato de fallo de las factories Crear(...) de los nuggets y el loader de datos embebidos. Todos los nuggets dependen de este paquete.

Instalación

dotnet add package Cosmos.Types.Abstractions

Qué incluye

  • Result<T> — resultado de una factory Crear(...): éxito con valor (y advertencias opcionales) o fallo con errores de regla. No se usan excepciones para validación.
  • ErrorRegla(Codigo, Mensaje) / Advertencia(Codigo, Mensaje) — códigos de regla (V01, V02, …) que reportan las factories.
  • RecursoEmbebido — carga catálogos JSON embebidos con GetManifestResourceStream scopeado por el namespace de un tipo ancla.

Uso

using Cosmos.Types.Abstractions;

Result<Pais> resultado = Pais.Crear("CO");

if (resultado.EsExitoso)
{
    Pais pais = resultado.Valor;
    foreach (Advertencia advertencia in resultado.Advertencias)
        Console.WriteLine($"{advertencia.Codigo}: {advertencia.Mensaje}");
}
else
{
    foreach (ErrorRegla error in resultado.Errores)
        Console.WriteLine($"{error.Codigo}: {error.Mensaje}");
}

// Acceder a .Valor en un Result fallido lanza InvalidOperationException.

Requiere net10.0.

Documentación

Licencia

Uso interno del ERP Cosmos.

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 (8)

Showing the top 5 NuGet packages that depend on Cosmos.Types.Abstractions:

Package Downloads
Cosmos.Impuestos.Contratos

Eventos públicos de integración de Cosmos Impuestos (IPublicEvent) para consumidores en otros bounded contexts.

Cosmos.Types.Paises

Value Object Pais para el ERP Cosmos, con catálogo embebido de 195 países (código ISO, nombre, indicativo telefónico). Diseñado para eventos event-sourced.

Cosmos.Types.IdentificacionesLegales

Value Object IdentificacionLegal para el ERP Cosmos: tipo de documento, número y dígito de verificación (módulo-11 DIAN), con catálogo embebido de 46 tipos. Diseñado para eventos event-sourced.

Cosmos.Types.DivisionesTerritoriales

Value Object DivisionTerritorial para el ERP Cosmos, con catálogo DIVIPOLA de Colombia embebido (33 departamentos + 1.122 municipios). Diseñado para eventos event-sourced.

Cosmos.Types.Telefonos

Value Object Telefono para el ERP Cosmos: valida indicativo de país (contra el catálogo de Cosmos.Types.Paises) y número. Diseñado para eventos event-sourced.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.1 310 6/30/2026
1.1.0 198 6/24/2026