Skip to content

Search EricksonLopez.* Ecosystem

Type a library name, NuGet package ID, .NET type, or architectural concept to search across the portal.

Guides & Recipes — EricksonLopez.ValueObjects

using EricksonLopez.Result;
using EricksonLopez.ValueObjects.Fiscal.DominicanRepublic;
namespace Example.ValueObjectsRecipes;
public static class FiscalValidationSample
{
public static Result<Rnc> ParseTaxId(string rawRnc) => Rnc.Create(rawRnc);
}

Decorate custom readonly partial record struct types with [ValueObject] and a static Create(...) factory returning Result<TSelf> so ValueObjectIncrementalGenerator synthesizes IParsable<TSelf> and ISpanParsable<TSelf>.