コード例 #1
0
 private static void CheckResults <TResult>(LogAndResult <TResult> expression, LogAndResult <TResult> function)
 {
     if (!expression.Equals(function))
     {
         throw new InvalidOperationException($"Results don't match.\r\n\r\nExpression: {expression}\r\n\r\nFunction: {function}");
     }
 }
コード例 #2
0
 public bool Equals(LogAndResult <T> other)
 {
     return(Log.SequenceEqual(other.Log) && EqualityComparer <T> .Default.Equals(Value, other.Value) && Error?.GetType() == other.Error?.GetType());
 }