SdgApps.Common.DotnetSealedUnions 1.0.0

dotnet add package SdgApps.Common.DotnetSealedUnions --version 1.0.0                
NuGet\Install-Package SdgApps.Common.DotnetSealedUnions -Version 1.0.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="SdgApps.Common.DotnetSealedUnions" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SdgApps.Common.DotnetSealedUnions --version 1.0.0                
#r "nuget: SdgApps.Common.DotnetSealedUnions, 1.0.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.
// Install SdgApps.Common.DotnetSealedUnions as a Cake Addin
#addin nuget:?package=SdgApps.Common.DotnetSealedUnions&version=1.0.0

// Install SdgApps.Common.DotnetSealedUnions as a Cake Tool
#tool nuget:?package=SdgApps.Common.DotnetSealedUnions&version=1.0.0                

<a name="readme-top"></a>

Contributors Forks Stargazers Issues MIT License LinkedIn

<br /> <div align="center"> <a href="https://github.com/nabond251/dotnet-sealed-unions"> <img src="images/logo.png" alt="Logo" width="80" height="80"> </a>

<h3 align="center">.NET Sealed Unions</h3>

<p align="center"> Yet Another Coproducts Port <br /> <a href="https://github.com/nabond251/dotnet-sealed-unions"><strong>Explore the docs �</strong></a> <br /> <br /> <a href="https://github.com/nabond251/dotnet-sealed-unions">View Demo</a> � <a href="https://github.com/nabond251/dotnet-sealed-unions/issues">Report Bug</a> � <a href="https://github.com/nabond251/dotnet-sealed-unions/issues">Request Feature</a> </p> </div>

<details> <summary>Table of Contents</summary> <ol> <li><a href="#about-the-project">About The Project</a></li> <li><a href="#usage">Usage</a></li> <li><a href="#roadmap">Roadmap</a></li> <li><a href="#contributing">Contributing</a></li> <li><a href="#license">License</a></li> <li><a href="#contact">Contact</a></li> <li><a href="#acknowledgments">Acknowledgments</a></li> </ol> </details>

About The Project

This is a .NET port of Francisco (Paco) Est�vez's JavaSealedUnions.

In computer science, a tagged union, also called a variant, variant record, choice type, discriminated union, disjoint union, sum type or coproduct, is a data structure used to hold a value that could take on several different, but fixed, types.

— Wikipedia, Tagged Union

And apparently now "sealed union" works, too. This structure is the counterpart to the tuple. A tuple allows you to form expressions which model data0 and data1 and data2; a tagged union allows you to model data0 or data1 or data2. Several languages either support this structure natively, or have supplied a library implementing it. The sealed union flavor is a simple, elegant implementation of such a library, so here it is for .NET.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Usage

A simple way to get a feel for the workings of this library would be to clone this repository and run the xUnit tests. One implements the Tennis kata (see The Tennis kata revisited by Mark Seemann).

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Roadmap

  • Improve documentation
  • Integrate with C# 9 switch pattern matching

See the open issues for a full list of proposed features (and known issues).

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

<p align="right">(<a href="#readme-top">back to top</a>)</p>

License

Distributed under the Apache-2.0 license. See LICENSE.txt for more information.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Contact

Nathaniel Bond - @bondolin_7 - nabond251@gmail.com

Project Link: https://github.com/nabond251/dotnet-sealed-unions

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Acknowledgments

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • 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.

Version Downloads Last updated
1.0.0 250 1/22/2023

v1.0.0 Initial release