예제 #1
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         return(((FamilyNames != null ? FamilyNames.GetHashCode() : 0) * 397) ^ (Key != null ? Key.GetHashCode() : 0));
     }
 }
예제 #2
0
        /// <summary>
        /// Returns a <see cref="string" /> that represents this instance.
        /// </summary>
        /// <returns>
        /// A <see cref="string" /> that represents this instance.
        /// </returns>
        public override string ToString()
        {
            if (Key != null)
            {
                return(Key + "#" + FamilyNames);
            }

            return(FamilyNames.ToString());
        }
예제 #3
0
        /// <summary>
        /// Returns a hash code for this instance.
        /// </summary>
        /// <returns>
        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
        /// </returns>
        public override int GetHashCode()
        {
            unchecked
            {
                var hash = (int)2186146271;

                hash = (hash * 15768619) ^ FamilyNames.GetHashCode();

                if (Key != null)
                {
                    hash = (hash * 15768619) ^ Key.GetHashCode();
                }

                return(hash);
            }
        }
예제 #4
0
 public FamilyName(FamilyNames name)
 {
     family_name_enum = name;
     family_name_string = name.ToString();
     family_id = (int)name;
 }
예제 #5
0
 public FirstNamesTests(ITestOutputHelper helper)
 {
     _helper    = helper;
     _underTest = new FamilyNames();
 }