예제 #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (obj.GetType() != base.GetType())
            {
                return(false);
            }
            FactionMapping FactionMapping = (FactionMapping)obj;

            return(this.Faction1 == FactionMapping.Faction1 && this.Faction2 == FactionMapping.Faction2);
        }
예제 #2
0
 internal FactionMapping(IFaction faction1, IFaction faction2)
 {
     if (string.CompareOrdinal(faction1.StringId, faction2.StringId) < 0)
     {
         this.Faction1 = faction1;
         this.Faction2 = faction2;
     }
     else
     {
         this.Faction1 = faction2;
         this.Faction2 = faction1;
     }
     this._hashCode = FactionMapping.CalculateHash(this.Faction1.StringId + this.Faction2.StringId);
 }
예제 #3
0
 public bool Equals(FactionMapping p)
 {
     return(this.Faction1 == p.Faction1 && this.Faction2 == p.Faction2);
 }
예제 #4
0
 internal FactionMapping(FactionMapping other)
 {
     this.Faction1  = other.Faction1;
     this.Faction2  = other.Faction2;
     this._hashCode = other._hashCode;
 }