示例#1
0
 public bool Equals(Expected <TToken> other)
 => object.Equals(Label, other.Label) &&
 ((ReferenceEquals(null, Tokens) && ReferenceEquals(null, other.Tokens)) ||
  (!ReferenceEquals(null, Tokens) && !ReferenceEquals(null, other.Tokens) && Tokens.SequenceEqual(other.Tokens))
 );
 public void AddExpected(Expected <TToken> expected)
 {
     _expecteds.Add(expected);
 }
示例#3
0
 /// <inheritdoc/>
 public bool Equals(Expected <TToken> other)
 => object.Equals(Label, other.Label) &&
 ((ReferenceEquals(null, InternalTokens) && ReferenceEquals(null, other.InternalTokens)) ||
  (!ReferenceEquals(null, InternalTokens) && !ReferenceEquals(null, other.InternalTokens) && InternalTokens.Equals(other.InternalTokens))
 );
示例#4
0
文件: Expected.cs 项目: sambsp/Pidgin
 /// <inheritdoc/>
 public bool Equals(Expected <TToken> other)
 => object.Equals(Label, other.Label) &&
 ((InternalTokens.IsDefault && InternalTokens.IsDefault) ||
  (!InternalTokens.IsDefault && !InternalTokens.IsDefault && EnumerableExtensions.Equal(InternalTokens, other.InternalTokens))
 );