Ejemplo n.º 1
0
        /// <summary>
        /// Implements a comparison to determine if the provile identifier describes the same person. This means if ANY of the
        /// indentifiers is equal to the other object.
        /// </summary>
        /// <param name="other">the "other" object</param>
        /// <returns>true if one of the identifiers matches</returns>
        public bool Equals(ProfileIdentifierDictionary other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(this.MatchesAny(other));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Tests if any of the identifiers provided with the <paramref name="other"/> parameter
 /// does match to this set of identifiers.
 /// </summary>
 /// <param name="other">the set to test for</param>
 /// <returns>true in case of min. one matches</returns>
 public bool MatchesAny(ProfileIdentifierDictionary other)
 {
     return(other.Any(identifier => this.GetProfileId(identifier.Key) == identifier.Value));
 }