/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// метод проерки двух объектов на равенство /// </summary> /// <returns> /// true if the current object is equal to the <paramref name="other" /> parameter; otherwise, false. /// </returns> /// <param name="other">An object to compare with this object.</param> public bool Equals(IDriverCommonContext other) { /*TODO: When mnore than one driver type exists this entity should be refactored to use AOM strategy model!!!!!*/ var typedEntity = other as AomTcpDriverContextEntity; if (typedEntity == null) { return(false); } return(typedEntity.TcpAddress.Equals(this.TcpAddress) & typedEntity.TcpPortNumber.Equals(this.TcpPortNumber)); }
/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// Проверяет или текущий объект идентичен другому объекту такого же типа /// </summary> /// <returns> /// true if the current object is equal to the <paramref name="other" /> parameter; otherwise, false. /// </returns> /// <param name="other">An object to compare with this object.</param> public bool Equals(IDriverCommonContext other) { return(other != null && other.Equals(this._context)); }