Skip to content

Instantly share code, notes, and snippets.

@SteveGilham
Created April 20, 2015 19:42
namespace Test.Component
{
[DebuggerDisplay("{__DebugDisplay(),nq}"), CompilationMapping(SourceConstructFlags.SumType)]
[Serializable]
[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
public abstract class Either<TFault, TSuccess> : IEquatable<Either<TFault, TSuccess>>, IStructuralEquatable, IComparable<Either<TFault, TSuccess>>, IComparable, IStructuralComparable
{
...
[Obsolete("ToOption")]
public static FSharpOption<TSuccess> toOption(Either<TFault, TSuccess> value)
{
if (value is Either<TFault, TSuccess>.Right)
{
Either<TFault, TSuccess>.Right right = (Either<TFault, TSuccess>.Right)value;
TSuccess y = right.item;
return FSharpOption<TSuccess>.Some(y);
}
return null;
}
...
}
}
where I can't for th
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment