SHARE
TWEET

Untitled

a guest Nov 15th, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Result<T> MyFunction()
  2.    
  3. public ParseFailure<TOther> As<TOther>()
  4. {
  5.     return new ParseFailure<TOther>(_input, _message, _expectations);
  6. }
  7.    
  8. Result<OldType> firstResult = ...
  9. if (firstResult.Failed) return firstResult.As<NewType>();
  10.    
  11. if (firstResult.Failed) return firstResult;
RAW Paste Data
Top