Cleaned up and refactored.
Cleaned up pattern matching implementation. Removed implicit conversion operator from MatchCase<T, TResult> to TResult because it was overly situational and limited extensibility. Refactored and MatchCase, IMatchCase, etc. to have consistent interface names. Removed unnecessary overloads. Added When and When<TCase> functionality to the MatchCase<T> class. Removed predicate accepting overloads, the When method must now be used for all conditional tests beyond simple type checks.
Cleaned up and refactored.
Cleaned up pattern matching implementation. Removed implicit conversion operator from MatchCase<T, TResult> to TResult because it was overly situational and limited extensibility. Refactored and MatchCase, IMatchCase, etc. to have consistent interface names. Removed unnecessary overloads. Added When and When<TCase> functionality to the MatchCase<T> class. Removed predicate accepting overloads, the When method must now be used for all conditional tests beyond simple type checks.