public override int GetHashCode()
        {
            int hash = 1;

            if (MsgType.Length != 0)
            {
                hash ^= MsgType.GetHashCode();
            }
            if (DeviceId.Length != 0)
            {
                hash ^= DeviceId.GetHashCode();
            }
            if (ModuleId.Length != 0)
            {
                hash ^= ModuleId.GetHashCode();
            }
            if (Id != 0L)
            {
                hash ^= Id.GetHashCode();
            }
            if (HeartbeatCreatedTicksUtc != 0L)
            {
                hash ^= HeartbeatCreatedTicksUtc.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserId != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (ModuleId != global::Lspb.ModuleId.UnknownModel)
            {
                hash ^= ModuleId.GetHashCode();
            }
            if (MethodId != global::Lspb.ClientMsgType.ErrorClientType)
            {
                hash ^= MethodId.GetHashCode();
            }
            if (cliEnterRoom_ != null)
            {
                hash ^= CliEnterRoom.GetHashCode();
            }
            if (cliInitOver_ != null)
            {
                hash ^= CliInitOver.GetHashCode();
            }
            if (cliOperate_ != null)
            {
                hash ^= CliOperate.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var result = (MotherBoardId != null ? MotherBoardId.GetHashCode() : 0);
         result = (result * 397) ^ ModuleId.GetHashCode();
         result = (result * 397) ^ ControlId.GetHashCode();
         result = (result * 397) ^ ModuleType.GetHashCode();
         result = (result * 397) ^ BlockId.GetHashCode();
         return(result);
     }
 }
Esempio n. 4
0
        public override int GetHashCode()
        {
            //Get hash code for the RoleId field if it is not null.
            int hashRoleId = RoleId.GetHashCode();

            //Get hash code for the ModuleId field.
            int hashModuleId = ModuleId.GetHashCode();

            //Get hash code for the PermissionId field.
            int hashPermissionId = PermissionId == null ? 0 : ModuleId.GetHashCode();

            //Calculate the hash code for the entire object.
            return(hashRoleId ^ hashModuleId ^ hashPermissionId);
        }