Unio.SourceGenerator
0.7.12
Requires NuGet 2.12 or higher.
dotnet add package Unio.SourceGenerator --version 0.7.12
NuGet\Install-Package Unio.SourceGenerator -Version 0.7.12
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="Unio.SourceGenerator" Version="0.7.12"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Unio.SourceGenerator" Version="0.7.12" />
<PackageReference Include="Unio.SourceGenerator"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
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 Unio.SourceGenerator --version 0.7.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Unio.SourceGenerator, 0.7.12"
#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 Unio.SourceGenerator@0.7.12
#: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=Unio.SourceGenerator&version=0.7.12
#tool nuget:?package=Unio.SourceGenerator&version=0.7.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Unio.SourceGenerator
Roslyn incremental source generator for Unio discriminated unions.
Generates named, strongly-typed union wrappers from a simple declaration:
using Unio;
[GenerateUnio]
public partial struct StringOrInt : IUnio<string, int>;
The generator produces the full union API: IsT0/IsT1, AsT0/AsT1, TryGetT0/TryGetT1, Match, Switch, implicit operators, equality and ToString().
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.