Ejemplo n.º 1
0
 public bool Equals(ResourceInventory that)
 {
     if (Object.ReferenceEquals(that, null))
     {
         return(false);
     }
     if (Object.ReferenceEquals(this, that))
     {
         return(true);
     }
     if (this.GetType() != that.GetType())
     {
         return(false);
     }
     return(Enumerable.SequenceEqual(this.GetResources().OrderBy(kvp => kvp.Type), that.GetResources().OrderBy(kvp => kvp.Type)));
 }