示例#1
0
 public void Deconstruct(out int from, out int to)
 {
     if (hashCode == null)
     {
         // default(Times) == AtLeastOnce
         AtLeastOnce.Deconstruct(out from, out to);
     }
     else
     {
         from = From;
         to   = To;
     }
 }
示例#2
0
 /// <summary>
 ///   Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 ///  A hash code for this instance, suitable for use in hashing algorithms
 ///  and data structures like a hash table.
 /// </returns>
 public override int GetHashCode() => hashCode == null?AtLeastOnce.GetHashCode() : hashCode.Value;