Ejemplo n.º 1
0
    public static ulong ULong(MyUint64 uint64Value)
    {
        ulong ulongHigh = (ulong)uint64Value.High;

        ulongHigh = ulongHigh << 32;
        ulong ulongValue = ulongHigh + uint64Value.Low;

        return(ulongValue);
    }
Ejemplo n.º 2
0
    public static MyUint64 Uint64(ulong longValue)
    {
        MyUint64 myUnit64 = new MyUint64();
        uint     high     = (uint)(longValue >> 32);
        uint     low      = (uint)(longValue - ((ulong)high << 32));

        myUnit64.High = high;
        myUnit64.Low  = low;
        return(myUnit64);
    }
Ejemplo n.º 3
0
    public static MyUint64 Uint64(LuaInteger64 uint64Helper)
    {
        MyUint64 myUnit64  = new MyUint64();
        ulong    longValue = uint64Helper.ToUInt64();
        uint     high      = (uint)(longValue >> 32);
        uint     low       = (uint)(longValue - ((ulong)(high) << 32));

        myUnit64.High = high;
        myUnit64.Low  = low;
        return(myUnit64);
    }
Ejemplo n.º 4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (MyDouble != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(MyDouble);
            }
            if (MyFloat != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MyFloat);
            }
            if (MyInt32 != 0)
            {
                hash ^= MyInt32.GetHashCode();
            }
            if (MyUint32 != 0)
            {
                hash ^= MyUint32.GetHashCode();
            }
            if (MyUint64 != 0UL)
            {
                hash ^= MyUint64.GetHashCode();
            }
            if (MyBool != false)
            {
                hash ^= MyBool.GetHashCode();
            }
            if (MyString.Length != 0)
            {
                hash ^= MyString.GetHashCode();
            }
            if (MyBytes.Length != 0)
            {
                hash ^= MyBytes.GetHashCode();
            }
            hash ^= myStringList_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }