public override bool Equals(object obj) { if (ReferenceEquals(obj, null)) { return(false); } if (ReferenceEquals(obj, this)) { return(true); } AirTrafficController casted = obj as AirTrafficController; if (casted == null) { return(false); } return(base.Equals(obj) && string.Equals(casted.Frequency, Frequency, StringComparison.InvariantCultureIgnoreCase) && Equals(casted.FacilityType, FacilityType) && Equals(casted.VisualRange, VisualRange) && string.Equals(casted.ATIS, ATIS, StringComparison.InvariantCultureIgnoreCase) && Equals(casted.ATISTime, ATISTime)); }
public static AirTrafficControllerBuilder FromModel(AirTrafficController model) { return(new AirTrafficControllerBuilder() .WithClientType(model.ClientType) .WithAdministrativeVersion(model.AdministrativeVersion) .WithCallsign(model.Callsign) .WithClientRating(model.ClientRating) .WithConnectionTime(model.ConnectionTime) .WithLocation(model.Location == null ? model.Location : (GPS)model.Location.Clone()) .WithName(model.Name) .WithProtocol(model.Protocol) .WithServer(model.Server) .WithSoftwareName(model.SoftwareName) .WithSoftwareVersion(model.SoftwareVersion) .WithVID(model.VID) .WithFrequency(model.Frequency) .WithFacilityType(model.FacilityType) .WithVisualRange(model.VisualRange) .WithATIS(model.ATIS) .WithATISTime(model.ATISTime)); }