This project has moved and is read-only. For the latest updates, please go here.


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 11:26 PM by davedev
Included in Rxx 1.1.


jamesmiles wrote May 4, 2011 at 8:37 AM

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

jamesmiles wrote May 4, 2011 at 8:40 AM

This would be ambiguous...

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

davedev wrote Jun 3, 2011 at 6: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.

wrote Jun 23, 2011 at 11:26 PM

wrote Feb 21, 2013 at 11:47 PM

wrote May 16, 2013 at 11:31 AM