public override IdentifiedObject DeepCopy(IdentifiedObject copy = null) { if (copy == null) { copy = new SubGeographicalRegion(this.GlobalId); } ((SubGeographicalRegion)copy).substations.AddRange(substations); ((SubGeographicalRegion)copy).region = this.region; return(base.DeepCopy(copy)); }
public override bool Equals(object obj) { if (base.Equals(obj)) { SubGeographicalRegion x = (SubGeographicalRegion)obj; return((CompareHelper.CompareLists(x.Substations, this.Substations)) && this.Region == x.Region); } else { return(false); } }