public ITypedAttribute Get(ITypedAttributeName attributeName) { return (this.SingleOrDefault( a => string.Compare(a.AttributeType.Alias, attributeName.Alias, StringComparison.InvariantCultureIgnoreCase) == 0)); }
/// <summary> /// Compares the current object with another object of the same type. /// </summary> /// <returns> /// A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the <paramref name="other"/> parameter.Zero This object is equal to <paramref name="other"/>. Greater than zero This object is greater than <paramref name="other"/>. /// </returns> /// <param name="other">An object to compare with this object.</param> public int CompareTo(ITypedAttributeName other) { Contract.Requires(other != null); return string.Compare(other.Alias, Alias, StringComparison.InvariantCultureIgnoreCase); }
/// <summary> /// Compares the current object with another object of the same type. /// </summary> /// <returns> /// A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the <paramref name="other"/> parameter.Zero This object is equal to <paramref name="other"/>. Greater than zero This object is greater than <paramref name="other"/>. /// </returns> /// <param name="other">An object to compare with this object.</param> public int CompareTo(ITypedAttributeName other) { Contract.Requires(other != null); return(string.Compare(other.Alias, Alias, StringComparison.InvariantCultureIgnoreCase)); }