AspectSharp.Lang.AST.MethodSignature.ArgumentsHashCode C# (CSharp) Method

ArgumentsHashCode() private method

private ArgumentsHashCode ( ) : int
return int
		private int ArgumentsHashCode()
		{
			int argsHash = _arguments.Count + 1;
			foreach(object item in _arguments)
			{
				argsHash = argsHash ^ item.GetHashCode();
			}
			return argsHash;
		}

Usage Example

Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            MethodSignature otherMethod = obj as MethodSignature;

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

            if (otherMethod.AllRetTypes == AllRetTypes &&
                otherMethod.AllArguments == AllArguments &&
                otherMethod.ArgumentsHashCode() == ArgumentsHashCode() &&
                otherMethod.MethodName.Equals(MethodName) &&
                otherMethod.RetType.Equals(RetType) &&
                otherMethod.Access.Equals(Access))
            {
                return(true);
            }

            return(false);
        }