Пример #1
0
 private static Interval <int> CreateRange(PrimitiveMatchEntry operandMatch)
 {
     return(operandMatch switch
     {
         RangeMatchEntry rangeMatch => rangeMatch.IntRange,
         SingleMatchEntry singleMatch => CreateRange(singleMatch.Operand, singleMatch.Operand),
         _ => throw new InvalidOperationException()
     });
Пример #2
0
 private bool Equals(RangeMatchEntry other)
 {
     return(EqualityComparer <TOperand> .Default.Equals(MaxOperand, other.MaxOperand) && EqualityComparer <TOperand> .Default.Equals(MinOperand, other.MinOperand));
 }