This library adds support for LanguageExt types to MessagePack C#
This library is provided in NuGet.
Support for .NET Framework 4.6.1 and .NET Standard 2.0.
In the Package Manager Console -
Install-Package MessagePack.LanguageExt
or download directly from NuGet.
To use the LanguageExt resolver, you will have to add it to the composite resolver, as shown in the example below:
var resolver = CompositeResolver.Create(
            BuiltinResolver.Instance,
            LanguageExtResolver.Instance,
            ContractlessStandardResolver.Instance
            );
			
MessagePackSerializer.DefaultOptions = ContractlessStandardResolver.Options.WithResolver(resolver);  For more information on either MessagePack or LanguageExt, please follow the respective links below.
This is a quick guide on a basic serialization and de-serialization of a LanguageExt type.
Lst<int> list = List(1, 2, 3, 4, 5);;
var bin = MessagePackSerializer.Serialize(list);
var res = MessagePackSerializer.Deserialize<Lst<int>>(bin);
// inst == resArr<T>, Seq<T>, Lst<T>, Map<K,V>, Set<T>, HashSet<T>, HashMap<K,V> Que<T>, Stck<T>, Option<T>, and Either<L,R>
TBC
This project is licensed under the MIT License - see the LICENSE.md file for details