Exemplo n.º 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()));
 }
Exemplo n.º 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()));
 }