Skip to content

About

Tools for building C# Union Types

Resources

Stars

44 stars

Watchers

2 watching

Forks

Latest commit

 

History

127 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnionTypes.Toolkit

CI GitHub release

This repo is the source beind two packages available on Nuget.

What is this?

This repo was originally created as a design playground when working on the C# Union Types feature. It was meant to contain various hand built union types with a variety of implementation strategies and a general configurable source generator that would produce custom unions using the techniques being discussed during design meetings. This was long before any actual design was settled on and language feature worked started.

The original nuget release years ago contained a very different concept of unions to what has now become a feature for C# 15.

Both the toolkit library and the source generator have been updated to match the new C# Union Types feature, and both are now available for general use.

The source generator has been retrofitted to produce only unions matching the specification for C# Union Types feature and using the Custom Unions API's. The generator produces unions that do not box struct values by default.

Documentation

To learn more about how to use the packages built by this repo, follow these links.

How to Contribute

Please report bugs here under issues or submit PRs to fix them if you prefer.
Use discussions instead of issues to share ideas or make requests.

About

Tools for building C# Union Types

Resources

Stars

44 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages