Sdl.Web.Common.Models.MvcData.GetHashCode C# (CSharp) Метод

GetHashCode() публичный Метод

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
Результат int
        public override int GetHashCode()
        {
            return unchecked (
                SafeHashCode(ControllerName) ^
                SafeHashCode(ControllerAreaName) ^
                SafeHashCode(ActionName) ^
                SafeHashCode(ViewName) ^
                SafeHashCode(AreaName)
                );
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Serves as a hash function for a particular type.
        /// </summary>
        /// <returns>
        /// A hash code for the current Entity Model.
        /// </returns>
        public override int GetHashCode()
        {
            int h0 = Id?.GetHashCode() ?? base.GetHashCode();
            int h1 = HtmlClasses?.GetHashCode() ?? 0;
            int h2 = MvcData?.GetHashCode() ?? 0;

            return(Hash.CombineHashCodes(h0, h1, h2));
        }