Пример #1
0
        /// <summary>
        /// Gets a Hash Code to identify this instance
        /// </summary>
        /// <returns>Hashcode value</returns>
        public override int GetHashCode()
        {
            var fields = GetFields().Select(field => field.GetValue(this)).Where(value => value != null).ToList();

            fields.Add(GetType());
            return(HashCodeHelper.Generate(fields.ToArray()));
        }
Пример #2
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Generate(typeof(T), Value));
 }