GetHashCode() public method

public GetHashCode ( ) : int
return int
Beispiel #1
0
        public override int GetHashCode()
        {
            int result = base.GetHashCode();

            result = 29 * result + _Id.GetHashCode();
            return(result);
        }
Beispiel #2
0
        internal Value(System.Byte value, Parameterization p = Parameterization.Value)
            : base(value)
        {
            Original  = value;
            _clrType  = typeof(System.Byte);
            _hashCode = GetCrossTypeHashCode(_clrType, value.GetHashCode());

            Build = (buildContext, buildArgs) =>
            {
                return((p != Parameterization.None) ? (value.Parameterize(buildContext, p) ??
                                                       Mapping.BuildCast(value)) : Mapping.BuildCast(value));
            };
        }
Beispiel #3
0
        static StackObject *GetHashCode_4(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Byte instance_of_this_method = GetInstance(__domain, ptr_of_this_method, __mStack);

            var result_of_this_method = instance_of_this_method.GetHashCode();

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method;
            return(__ret + 1);
        }
Beispiel #4
0
 static int GetHashCode(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         System.Byte obj = (System.Byte)ToLua.CheckObject(L, 1, typeof(System.Byte));
         int         o   = obj.GetHashCode();
         LuaDLL.lua_pushinteger(L, o);
         ToLua.SetBack(L, 1, obj);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }