Composite.C1Console.Security.EntityToken.GetHashCode C# (CSharp) Method

GetHashCode() public method

public GetHashCode ( ) : int
return int
        public override int GetHashCode()
        {
            if (this.HashCode == 0)
            {
                ValidateEntityToken();
                this.HashCode = this.Type.GetHashCode() ^ this.Source.GetHashCode() ^ this.Id.GetHashCode();
            }

            return this.HashCode;
        }

Usage Example

Example #1
0
        /// <exclude />
        public bool EqualsWithVersionIgnore(object obj)
        {
            EntityToken entityToken = obj as EntityToken;

            if (entityToken == null)
            {
                return(false);
            }


            ValidateEntityToken();

            if (entityToken.GetHashCode() != GetHashCode())
            {
                return(false);
            }

            return(entityToken.Id == this.Id &&
                   entityToken.Type == this.Type &&
                   entityToken.Source == this.Source &&
                   entityToken.GetType() == this.GetType());
        }
All Usage Examples Of Composite.C1Console.Security.EntityToken::GetHashCode