public int CompareTo(object obj) { GetDataRequest peer = (GetDataRequest)obj; if (peer == null) { throw new InvalidOperationException("Comparing different types of records."); } int ret = 0; ret = Path.CompareTo(peer.Path); if (ret != 0) { return(ret); } ret = (Watch == peer.Watch)? 0 : (Watch?1:-1); if (ret != 0) { return(ret); } return(ret); }
public int CompareTo(object obj) { GetDataRequest getDataRequest = (GetDataRequest)obj; if (getDataRequest == null) { throw new InvalidOperationException("Comparing different types of records."); } int num1 = this.Path.CompareTo(getDataRequest.Path); if (num1 != 0) { return(num1); } int num2 = this.Watch == getDataRequest.Watch ? 0 : (this.Watch ? 1 : -1); if (num2 != 0) { return(num2); } return(num2); }