public bool Equals(ScopeID scopeID, IEqualityComparer <object> comparer) { if (object.ReferenceEquals(scopeID, null)) { return(false); } if (object.ReferenceEquals(this.m_scopeValues, scopeID.m_scopeValues)) { return(true); } int scopeValueCount = this.ScopeValueCount; if (scopeValueCount != scopeID.ScopeValueCount) { return(false); } for (int i = 0; i < scopeValueCount; i++) { if (!this.m_scopeValues[i].Equals(scopeID.m_scopeValues[i], comparer)) { return(false); } } return(true); }
public int Compare(ScopeID scopeID, IComparer <object> comparer) { int scopeValueCount = this.ScopeValueCount; if (scopeValueCount == 0) { if (!object.ReferenceEquals(scopeID, null) && scopeID.ScopeValueCount != 0) { return(-1); } return(0); } if (!object.ReferenceEquals(scopeID, null) && scopeID.ScopeValueCount != 0) { if (scopeValueCount != scopeID.ScopeValueCount) { throw new ArgumentException(); } for (int i = 0; i < scopeValueCount; i++) { int num = comparer.Compare(this.m_scopeValues[i].Value, scopeID.m_scopeValues[i].Value); if (num != 0) { return(num); } } return(0); } return(1); }
public bool Equals(ScopeID scopeID) { if (object.ReferenceEquals(this, scopeID)) { return(true); } if (object.ReferenceEquals(scopeID, null)) { return(false); } return(this.Equals(scopeID, null)); }
public ScopeID(ScopeID scopeID) : this(scopeID.m_scopeValues) { }