LeftValue and RightValue should be internal


Could LeftValue<TLeft, TRight> & RightValue<TLeft, TRight> be private?
Static factory could work.
Create<TLeft,TRight>(TLeft leftValue)
Create<TLeft,TRight>(TRight rightValue)
Closed Jun 23, 2011 at 10:26 PM by davedev
Included in Rxx 1.1.


jamesmiles wrote May 4, 2011 at 7:37 AM

Hmm... what if TLeft & TRight are the same type?

jamesmiles wrote May 4, 2011 at 7:40 AM

This would be ambiguous...

Test.Create<int, int>(42);

davedev wrote Jun 3, 2011 at 5:24 AM

LeftValue and RightValue classes are now internal for Rxx 1.1. To create Left and Right instances of the abstract Either<TLeft, TRight> class in the future, use the new static factory methods: Either.Left<TLeft, TRight>(TLeft value) and Either.Right<TLeft, TRight>(TRight value), respectively.