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