Beispiel #1
0
 public void Read(hsStream s)
 {
     pnVaultNodeFields f = (pnVaultNodeFields)s.ReadULong();
     for (ulong bit = 1; bit != 0 && bit <= (ulong)f; bit <<= 1) {
         switch (f & (pnVaultNodeFields)bit) {
             case pnVaultNodeFields.Blob_1:
                 fBlob[0] = s.ReadBytes(s.ReadInt());
                 break;
             case pnVaultNodeFields.Blob_2:
                 fBlob[1] = s.ReadBytes(s.ReadInt());
                 break;
             case pnVaultNodeFields.CreateAgeName:
                 fCreateAgeName = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.CreateAgeUuid:
                 fCreateAgeGuid = pnHelpers.ReadUuid(s);
                 break;
             case pnVaultNodeFields.CreateTime:
                 fCreateTime = plUnifiedTime.Epoch.AddSeconds((double)s.ReadInt());
                 break;
             case pnVaultNodeFields.CreatorIdx:
                 fCreatorID = s.ReadUInt();
                 break;
             case pnVaultNodeFields.CreatorUuid:
                 fCreatorGuid = pnHelpers.ReadUuid(s);
                 break;
             case pnVaultNodeFields.Int32_1:
                 fInt32[0] = s.ReadInt();
                 break;
             case pnVaultNodeFields.Int32_2:
                 fInt32[1] = s.ReadInt();
                 break;
             case pnVaultNodeFields.Int32_3:
                 fInt32[2] = s.ReadInt();
                 break;
             case pnVaultNodeFields.Int32_4:
                 fInt32[3] = s.ReadInt();
                 break;
             case pnVaultNodeFields.IString64_1:
                 fIString64[0] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.IString64_2:
                 fIString64[1] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.ModifyTime:
                 fModifyTime = plUnifiedTime.Epoch.AddSeconds((double)s.ReadInt());
                 break;
             case pnVaultNodeFields.NodeIdx:
                 fNodeID = s.ReadUInt();
                 break;
             case pnVaultNodeFields.NodeType:
                 fNodeType = (ENodeType)s.ReadUInt();
                 break;
             case pnVaultNodeFields.String64_1:
                 fString64[0] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.String64_2:
                 fString64[1] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.String64_3:
                 fString64[2] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.String64_4:
                 fString64[3] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.String64_5:
                 fString64[4] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.String64_6:
                 fString64[5] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.Text_1:
                 fText[0] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.Text_2:
                 fText[1] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.UInt32_1:
                 fUInt32[0] = s.ReadUInt();
                 break;
             case pnVaultNodeFields.UInt32_2:
                 fUInt32[1] = s.ReadUInt();
                 break;
             case pnVaultNodeFields.UInt32_3:
                 fUInt32[2] = s.ReadUInt();
                 break;
             case pnVaultNodeFields.UInt32_4:
                 fUInt32[3] = s.ReadUInt();
                 break;
             case pnVaultNodeFields.Uuid_1:
                 fGuid[0] = pnHelpers.ReadUuid(s);
                 break;
             case pnVaultNodeFields.Uuid_2:
                 fGuid[1] = pnHelpers.ReadUuid(s);
                 break;
             case pnVaultNodeFields.Uuid_3:
                 fGuid[2] = pnHelpers.ReadUuid(s);
                 break;
             case pnVaultNodeFields.Uuid_4:
                 fGuid[3] = pnHelpers.ReadUuid(s);
                 break;
         }
     }
 }