/// <summary>
 /// Override GetHashCode for object
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = 1;
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ParentController != null ? ParentController.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ParentAction != null ? ParentAction.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ParentArea != null ? ParentArea.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Area != null ? Area.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Controller != null ? Controller.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Action != null ? Action.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Parent != null ? Parent.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ControllerSecurity != null ? ControllerSecurity.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ActionSecurity != null ? ActionSecurity.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemple #2
0
 public override string ToString()
 {
     return(string.Format("HexCell:\n Coords: {0}\n Area It belongs to:\t{1}\r\n Base in Cell: NOT IMPLEMENTED",
                          Coords.ToString(), (ParentArea != null) ? ParentArea.ToString() : "Not in any area"));
 }