예제 #1
0
 public int CompareTo(OtpErlangMap other)
 {
     if (other is null)
     {
         return(1);
     }
     return(OtpErlangObject.CompareTo(this.OrderBy(kvp => kvp.Key), other.OrderBy(kvp => kvp.Key), new KeyValueComparer()));
 }
예제 #2
0
 public bool Equals(OtpErlangMap o)
 {
     if (o is null)
     {
         return(false);
     }
     if (ReferenceEquals(this, o))
     {
         return(true);
     }
     return(Arity == o.Arity &&
            this.OrderBy(kvp => kvp.Key).SequenceEqual(o.OrderBy(kvp => kvp.Key), new KeyValueEquality()));
 }