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}"); } }
public bool Equals(LogAndResult <T> other) { return(Log.SequenceEqual(other.Log) && EqualityComparer <T> .Default.Equals(Value, other.Value) && Error?.GetType() == other.Error?.GetType()); }