/// <summary> /// Determines whether the specified <see cref="System.Object" />, is equal to this instance. /// </summary> /// <param name="obj">The <see cref="System.Object" /> to compare with this instance.</param> /// <returns> /// <c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>. /// </returns> public override bool Equals(object obj) { bool isEqual = !object.ReferenceEquals(null, obj); if (isEqual) { ServiceInfoList other = obj as ServiceInfoList; if (!object.ReferenceEquals(null, other)) { if (Count == other.Count) { for (int i = 0; i < Count && isEqual; ++i) { isEqual = this[i].Equals(other[i]); } } else { isEqual = false; } } else { isEqual = false; } } return(isEqual); }
public SystemInfo( string systemId, string missionId, ushort vehiclePhysicalIdField, uint status, bool isOnline, CommunicationLink communicationLink, ServiceInfoList serviceList, PisBaseline pisBaseline, PisVersion pisVersion, PisMission pisMission, bool isPisBaselineUpToDate) { this._systemId = systemId; this._missionId = missionId; this._vehiclePhysicalId = vehiclePhysicalIdField; this._status = status; this._isOnline = isOnline; this._communicationLink = communicationLink; this._serviceList = serviceList; this._pisBaseline = pisBaseline; this._pisVersion = pisVersion; this._pisMission = pisMission; this._isPisBaselineUpToDate = isPisBaselineUpToDate; }
/// <summary> /// Initializes a new instance of the <see cref="SystemInfo"/> class. /// </summary> public SystemInfo() { this._systemId = string.Empty; this._missionId = string.Empty; this._vehiclePhysicalId = 0; this._status = 0; this._isOnline = false; this._communicationLink = CommunicationLink.NotApplicable; this._serviceList = new ServiceInfoList(); this._pisBaseline = new PisBaseline(); this._pisVersion = new PisVersion(); this._pisMission = new PisMission(); this._isPisBaselineUpToDate = false; }
public SystemInfo(SystemInfo other) : this() { if (other != null) { // copy string references (strings are immutable) this._systemId = other._systemId; this._missionId = other._missionId; this._vehiclePhysicalId = other._vehiclePhysicalId; this._status = other._status; this._isOnline = other._isOnline; this._communicationLink = other._communicationLink; // shallow copy of list (service infos are immutable) this._serviceList = new ServiceInfoList(other._serviceList); // deep copy this._pisBaseline = new PisBaseline(other._pisBaseline); this._pisVersion = new PisVersion(other._pisVersion); this._pisMission = new PisMission(other._pisMission); this._isPisBaselineUpToDate = other._isPisBaselineUpToDate; } }