Пример #1
0
 /// <summary>
 /// Gets the hash code of a custom modifier
 /// </summary>
 /// <param name="a">Custom modifier</param>
 /// <returns></returns>
 public int GetHashCode(DmdCustomModifier a) => (a.IsRequired ? -1 : 0) ^ GetHashCode(a.Type);
Пример #2
0
 /// <summary>
 /// Compares two custom modifiers
 /// </summary>
 /// <param name="a">First custom modifier</param>
 /// <param name="b">Second custom modifier</param>
 /// <returns></returns>
 public bool Equals(DmdCustomModifier a, DmdCustomModifier b) => a.IsRequired == b.IsRequired && Equals(a.Type, b.Type);