/// <summary> /// Parse the RevisionManifestDataElement structure. /// </summary> /// <param name="s">An stream containing RevisionManifestDataElement structure.</param> public override void Parse(Stream s) { base.Parse(s); this.DataElementStart = new bit16StreamObjectHeaderStart(); this.DataElementStart.Parse(s); this.DataElementExtendedGUID = new ExtendedGUID(); this.DataElementExtendedGUID = this.DataElementExtendedGUID.TryParse(s); this.SerialNumber = new SerialNumber(); this.SerialNumber = this.SerialNumber.TryParse(s); this.DataElementType = new CompactUnsigned64bitInteger(); this.DataElementType = this.DataElementType.TryParse(s); this.RevisionManifest = new bit16StreamObjectHeaderStart(); this.RevisionManifest.Parse(s); this.RevisionID = new ExtendedGUID(); this.RevisionID = this.RevisionID.TryParse(s); this.BaseRevisionID = new ExtendedGUID(); this.BaseRevisionID = this.BaseRevisionID.TryParse(s); int RevisionType = (CurrentByte() >> 3) & 0x3F; List<object> DataList = new List<object>(); while ((CurrentByte() & 0x03) == 0x0 && (RevisionType == 0x0A || RevisionType == 0x19)) { switch (RevisionType) { case 0x0A: { RevisionManifestRootDeclareValues RootDeclareValue = new RevisionManifestRootDeclareValues(); RootDeclareValue.Parse(s); DataList.Add(RootDeclareValue); break; } case 0x19: { RevisionManifestObjectGroupReferencesValues ObjectGroupReferencesValue = new RevisionManifestObjectGroupReferencesValues(); ObjectGroupReferencesValue.Parse(s); DataList.Add(ObjectGroupReferencesValue); break; } default: throw new Exception("The RevisionType is not right."); } RevisionType = (CurrentByte() >> 3) & 0x3F; } this.RevisionManifestDataElementsData = DataList.ToArray(); this.DataElementEnd = new bit8StreamObjectHeaderEnd(); this.DataElementEnd.Parse(s); }
/// <summary> /// Parse the RevisionManifestObjectGroupReferencesValues structure. /// </summary> /// <param name="s">An stream containing RevisionManifestObjectGroupReferencesValues structure.</param> public override void Parse(Stream s) { base.Parse(s); this.RevisionManifestObjectGroupReferences = new bit16StreamObjectHeaderStart(); this.RevisionManifestObjectGroupReferences.Parse(s); this.ObjectGroupExtendedGUID = new ExtendedGUID(); this.ObjectGroupExtendedGUID = this.ObjectGroupExtendedGUID.TryParse(s); }
/// <summary> /// Parse the PutChangesResponse structure. /// </summary> /// <param name="s">An stream containing PutChangesResponse structure.</param> public override void Parse(Stream s) { base.Parse(s); this.putChangesResponse = new bit32StreamObjectHeaderStart(); this.putChangesResponse.Parse(s); this.AppliedStorageIndexId = new ExtendedGUID(); this.AppliedStorageIndexId = this.AppliedStorageIndexId.TryParse(s); this.DataElementsAdded = new ExtendedGUIDArray(); this.DataElementsAdded.Parse(s); this.ResultantKnowledge = new Knowledge(); this.ResultantKnowledge.Parse(s); this.DiagnosticRequestOptionOutput = new DiagnosticRequesOptionOutput(); this.DiagnosticRequestOptionOutput.Parse(s); }
/// <summary> /// Parse the QueryChangesResponse structure. /// </summary> /// <param name="s">An stream containing QueryChangesResponse structure.</param> public override void Parse(Stream s) { base.Parse(s); this.queryChangesResponse = new bit32StreamObjectHeaderStart(); this.queryChangesResponse.Parse(s); this.StorageIndexExtendedGUID = new ExtendedGUID(); this.StorageIndexExtendedGUID = this.StorageIndexExtendedGUID.TryParse(s); byte tempbyte = ReadByte(); this.P = GetBits(tempbyte, 0, 1); this.Reserved = GetBits(tempbyte, 1, 7); this.Knowledge = new Knowledge(); this.Knowledge.Parse(s); }
/// <summary> /// Parse the WaterlineKnowledgeEntry structure. /// </summary> /// <param name="s">An stream containing WaterlineKnowledgeEntry structure.</param> public override void Parse(Stream s) { base.Parse(s); this.waterlineKnowledgeEntry = new bit16StreamObjectHeaderStart(); this.waterlineKnowledgeEntry.Parse(s); this.CellStorageExtendedGUID = new ExtendedGUID(); this.CellStorageExtendedGUID = this.CellStorageExtendedGUID.TryParse(s); this.Waterline = new CompactUnsigned64bitInteger(); this.Waterline = this.Waterline.TryParse(s); this.Reserved = new CompactUnsigned64bitInteger(); this.Reserved = this.Reserved.TryParse(s); }
/// <summary> /// Parse the ContentTagKnowledgeEntry structure. /// </summary> /// <param name="s">An stream containing ContentTagKnowledgeEntry structure.</param> public override void Parse(Stream s) { base.Parse(s); this.ContentTagKnowledgeEntryStart = new bit16StreamObjectHeaderStart(); this.ContentTagKnowledgeEntryStart.Parse(s); this.BLOBExtendedGUID = new ExtendedGUID(); this.BLOBExtendedGUID = this.BLOBExtendedGUID.TryParse(s); this.ClockData = new BinaryItem(); this.ClockData.Parse(s); }
/// <summary> /// Parse the ObjectDataBLOBReference structure. /// </summary> /// <param name="s">An stream containing ObjectDataBLOBReference structure.</param> public override void Parse(Stream s) { base.Parse(s); this.ObjectGroupObjectDataBLOBReference = new StreamObjectHeader(); this.ObjectGroupObjectDataBLOBReference = this.ObjectGroupObjectDataBLOBReference.TryParse(s); this.ObjectExtendedGUIDArray = new ExtendedGUIDArray(); this.ObjectExtendedGUIDArray.Parse(s); this.CellIDArray = new CellIDArray(); this.CellIDArray.Parse(s); this.BLOBExtendedGUID = new ExtendedGUID(); this.BLOBExtendedGUID = this.BLOBExtendedGUID.TryParse(s); }
/// <summary> /// Parse the StorageManifestDataElement structure. /// </summary> /// <param name="s">An stream containing StorageManifestDataElement structure.</param> public override void Parse(Stream s) { base.Parse(s); this.DataElementStart = new bit16StreamObjectHeaderStart(); this.DataElementStart.Parse(s); this.DataElementExtendedGUID = new ExtendedGUID(); this.DataElementExtendedGUID = this.DataElementExtendedGUID.TryParse(s); this.SerialNumber = new SerialNumber(); this.SerialNumber = this.SerialNumber.TryParse(s); this.DataElementType = new CompactUnsigned64bitInteger(); this.DataElementType = this.DataElementType.TryParse(s); this.StorageManifestSchemaGUID = new bit16StreamObjectHeaderStart(); this.StorageManifestSchemaGUID.Parse(s); this.GUID = ReadGuid(); List<StorageManifestRootDeclareValues> StorageManifestRootDeclareList = new List<StorageManifestRootDeclareValues>(); while ((CurrentByte() & 0x03) == 0x0 && ((CurrentByte() >> 3) & 0x3F) == 0x07) { StorageManifestRootDeclareValues tempStorageManifestRootDeclare = new StorageManifestRootDeclareValues(); tempStorageManifestRootDeclare.Parse(s); StorageManifestRootDeclareList.Add(tempStorageManifestRootDeclare); } this.StorageManifestRootDeclare = StorageManifestRootDeclareList.ToArray(); this.DataElementEnd = new bit8StreamObjectHeaderEnd(); this.DataElementEnd.Parse(s); }
/// <summary> /// Parse the FragmentKnowledgeEntry structure. /// </summary> /// <param name="s">An stream containing FragmentKnowledgeEntry structure.</param> public override void Parse(Stream s) { base.Parse(s); this.FragmentDescriptor = new bit32StreamObjectHeaderStart(); this.FragmentDescriptor.Parse(s); this.ExtendedGUID = new ExtendedGUID(); this.ExtendedGUID = this.ExtendedGUID.TryParse(s); this.DataElementSize = new CompactUnsigned64bitInteger(); this.DataElementSize = this.DataElementSize.TryParse(s); this.DataElementChunkReference = new FileChunkReference(); this.DataElementChunkReference.Parse(s); }
/// <summary> /// Parse the ObjectDataBLOBDataElements structure. /// </summary> /// <param name="s">An stream containing ObjectDataBLOBDataElements structure.</param> public override void Parse(Stream s) { base.Parse(s); this.DataElementStart = new bit16StreamObjectHeaderStart(); this.DataElementStart.Parse(s); this.DataElementExtendedGUID = new ExtendedGUID(); this.DataElementExtendedGUID = this.DataElementExtendedGUID.TryParse(s); this.SerialNumber = new SerialNumber(); this.SerialNumber = this.SerialNumber.TryParse(s); this.DataElementType = new CompactUnsigned64bitInteger(); this.DataElementType = this.DataElementType.TryParse(s); this.ObjectDataBLOB = new StreamObjectHeader(); this.ObjectDataBLOB = this.ObjectDataBLOB.TryParse(s); this.Data = new BinaryItem(); this.Data.Parse(s); this.DataElementEnd = new bit8StreamObjectHeaderEnd(); this.DataElementEnd.Parse(s); }
/// <summary> /// Parse the ExtendedGUIDArray structure. /// </summary> /// <param name="s">An stream containing ExtendedGUIDArray structure.</param> public override void Parse(Stream s) { base.Parse(s); this.Count = new CompactUnsigned64bitInteger(); this.Count = this.Count.TryParse(s); List<ExtendedGUID> tempContent = new List<ExtendedGUID>(); if (this.Count.GetUint(Count) > 0) { ulong tempCount = this.Count.GetUint(Count); ExtendedGUID tempGuid = new ExtendedGUID(); do { tempGuid = tempGuid.TryParse(s); tempContent.Add(tempGuid); tempCount--; } while (tempCount > 0); this.Content = tempContent.ToArray(); } }
/// <summary> /// Parse the ExtendedGUID structure. /// </summary> /// <param name="s">An stream containing ExtendedGUID structure.</param> public ExtendedGUID TryParse(Stream s) { base.Parse(s); byte temp = ReadByte(); s.Position -= 1; ExtendedGUID extendedGUID = new ExtendedGUID(); if (temp == 0x0) { extendedGUID = new ExtendedGUIDNullValue(); extendedGUID.Parse(s); } else if ((temp & 0x07) == 0x4) { extendedGUID = new ExtendedGUID5BitUintValue(); extendedGUID.Parse(s); } else if ((temp & 0x3F) == 0x20) { extendedGUID = new ExtendedGUID10BitUintValue(); extendedGUID.Parse(s); } else if ((temp & 0x7F) == 0x40) { extendedGUID = new ExtendedGUID17BitUintValue(); extendedGUID.Parse(s); } else if (temp == 0x80) { extendedGUID = new ExtendedGUID32BitUintValue(); extendedGUID.Parse(s); } return extendedGUID; }
/// <summary> /// Parse the DataElementFragmentDataElement structure. /// </summary> /// <param name="s">An stream containing DataElementFragmentDataElement structure.</param> public override void Parse(Stream s) { base.Parse(s); this.DataElementStart = new bit16StreamObjectHeaderStart(); this.DataElementStart.Parse(s); this.DataElementExtendedGUID = new ExtendedGUID(); this.DataElementExtendedGUID = this.DataElementExtendedGUID.TryParse(s); this.SerialNumber = new SerialNumber(); this.SerialNumber = this.SerialNumber.TryParse(s); this.DataElementType = new CompactUnsigned64bitInteger(); this.DataElementType = this.DataElementType.TryParse(s); this.DataElementFragment = new bit32StreamObjectHeaderStart(); this.DataElementFragment.Parse(s); this.FragmentExtendedGUID = new ExtendedGUID(); this.FragmentExtendedGUID = this.FragmentExtendedGUID.TryParse(s); this.FragmentDataElementSize = new CompactUnsigned64bitInteger(); this.FragmentDataElementSize = this.FragmentDataElementSize.TryParse(s); this.FragmentFileChunkReference = new FileChunkReference(); this.FragmentFileChunkReference.Parse(s); this.FragmentData = new BinaryItem(); this.FragmentData.Parse(s); this.DataElementEnd = new bit8StreamObjectHeaderEnd(); this.DataElementEnd.Parse(s); }
/// <summary> /// Parse the StorageIndexDataElement structure. /// </summary> /// <param name="s">An stream containing StorageIndexDataElement structure.</param> public override void Parse(Stream s) { base.Parse(s); this.DataElementStart = new bit16StreamObjectHeaderStart(); this.DataElementStart.Parse(s); this.DataElementExtendedGUID = new ExtendedGUID(); this.DataElementExtendedGUID = this.DataElementExtendedGUID.TryParse(s); this.SerialNumber = new SerialNumber(); this.SerialNumber = this.SerialNumber.TryParse(s); this.DataElementType = new CompactUnsigned64bitInteger(); this.DataElementType = this.DataElementType.TryParse(s); int StorageIndexType = (CurrentByte() >> 3) & 0x3F; List<object> DataList = new List<object>(); while ((CurrentByte() & 0x03) == 0x0 && (StorageIndexType == 0x11 || StorageIndexType == 0x0E || StorageIndexType == 0x0D)) { switch (StorageIndexType) { case 0x11: StorageIndexManifestMappingValues ManifestMappingValue = new StorageIndexManifestMappingValues(); ManifestMappingValue.Parse(s); DataList.Add(ManifestMappingValue); break; case 0x0E: StorageIndexCellMappingValues CellMappingValue = new StorageIndexCellMappingValues(); CellMappingValue.Parse(s); DataList.Add(CellMappingValue); break; case 0x0D: StorageIndexRevisionMappingValues RevisionMappingValue = new StorageIndexRevisionMappingValues(); RevisionMappingValue.Parse(s); DataList.Add(RevisionMappingValue); break; default: throw new Exception("The StorageIndexType is not right."); } StorageIndexType = (CurrentByte() >> 3) & 0x3F; } this.StorageIndexDataElementData = DataList.ToArray(); this.DataElementEnd = new bit8StreamObjectHeaderEnd(); this.DataElementEnd.Parse(s); }
/// <summary> /// Parse the ObjectDeclaration structure. /// </summary> /// <param name="s">An stream containing ObjectDeclaration structure.</param> public override void Parse(Stream s) { base.Parse(s); this.ObjectGroupObjectDeclaration = new StreamObjectHeader(); this.ObjectGroupObjectDeclaration = this.ObjectGroupObjectDeclaration.TryParse(s); this.ObjectExtendedGUID = new ExtendedGUID(); this.ObjectExtendedGUID = this.ObjectExtendedGUID.TryParse(s); this.ObjectPartitionID = new CompactUnsigned64bitInteger(); this.ObjectPartitionID = this.ObjectPartitionID.TryParse(s); this.ObjectDataSize = new CompactUnsigned64bitInteger(); this.ObjectDataSize = this.ObjectDataSize.TryParse(s); this.ObjectReferencesCount = new CompactUnsigned64bitInteger(); this.ObjectReferencesCount = this.ObjectReferencesCount.TryParse(s); this.CellReferencesCount = new CompactUnsigned64bitInteger(); this.CellReferencesCount = this.CellReferencesCount.TryParse(s); }
/// <summary> /// Parse the StorageIndexRevisionMappingValues structure. /// </summary> /// <param name="s">An stream containing StorageIndexRevisionMappingValues structure.</param> public override void Parse(Stream s) { base.Parse(s); this.StorageIndexRevisionMapping = new bit16StreamObjectHeaderStart(); this.StorageIndexRevisionMapping.Parse(s); this.RevisionExtendedGUID = new ExtendedGUID(); this.RevisionExtendedGUID = this.RevisionExtendedGUID.TryParse(s); this.RevisionMappingExtendedGUID = new ExtendedGUID(); this.RevisionMappingExtendedGUID = this.RevisionMappingExtendedGUID.TryParse(s); this.RevisionMappingSerialNumber = new SerialNumber(); this.RevisionMappingSerialNumber = this.RevisionMappingSerialNumber.TryParse(s); }
/// <summary> /// Parse the ObjectGroupDataElements structure. /// </summary> /// <param name="s">An stream containing ObjectGroupDataElements structure.</param> public override void Parse(Stream s) { base.Parse(s); this.DataElementStart = new bit16StreamObjectHeaderStart(); this.DataElementStart.Parse(s); this.DataElementExtendedGUID = new ExtendedGUID(); this.DataElementExtendedGUID = this.DataElementExtendedGUID.TryParse(s); this.SerialNumber = new SerialNumber(); this.SerialNumber = this.SerialNumber.TryParse(s); this.DataElementType = new CompactUnsigned64bitInteger(); this.DataElementType = this.DataElementType.TryParse(s); if (ContainsStreamObjectHeader(0x06)) { this.DataElementHash = new DataElementHash(); this.DataElementHash.Parse(s); } this.ObjectGroupDeclarationsStart = new StreamObjectHeader(); this.ObjectGroupDeclarationsStart = this.ObjectGroupDeclarationsStart.TryParse(s); List<object> DeclarationList = new List<object>(); while (ContainsStreamObjectHeader(0x18) || ContainsStreamObjectHeader(0x05)) { if (ContainsStreamObjectHeader(0x18)) { ObjectDeclaration Declaration = new ObjectDeclaration(); Declaration.Parse(s); DeclarationList.Add(Declaration); } else if (ContainsStreamObjectHeader(0x05)) { ObjectDataBLOBDeclaration DeclarationBLOB = new ObjectDataBLOBDeclaration(); DeclarationBLOB.Parse(s); DeclarationList.Add(DeclarationBLOB); } } this.ObjectDeclarationOrObjectDataBLOBDeclaration = DeclarationList.ToArray(); this.ObjectGroupDeclarationsEnd = new bit8StreamObjectHeaderEnd(); this.ObjectGroupDeclarationsEnd.Parse(s); if (ContainsStreamObjectHeader(0x79)) { this.ObjectMetadataDeclaration = new ObjectMetadataDeclaration(); this.ObjectMetadataDeclaration.Parse(s); } this.ObjectGroupDataStart = new StreamObjectHeader(); this.ObjectGroupDataStart = this.ObjectGroupDataStart.TryParse(s); List<object> ObjectDataList = new List<object>(); while (ContainsStreamObjectHeader(0x16) || ContainsStreamObjectHeader(0x1C)) { if (ContainsStreamObjectHeader(0x16)) { ObjectData data = new ObjectData(); data.Parse(s); ObjectDataList.Add(data); } else if (ContainsStreamObjectHeader(0x1C)) { ObjectDataBLOBReference DataBLOB = new ObjectDataBLOBReference(); DataBLOB.Parse(s); ObjectDataList.Add(DataBLOB); } } this.ObjectDataOrObjectDataBLOBReference = ObjectDataList.ToArray(); this.ObjectGroupDataEnd = new bit8StreamObjectHeaderEnd(); this.ObjectGroupDataEnd.Parse(s); this.DataElementEnd = new bit8StreamObjectHeaderEnd(); this.DataElementEnd.Parse(s); }
/// <summary> /// Parse the StorageManifestRootDeclareValues structure. /// </summary> /// <param name="s">An stream containing StorageManifestRootDeclareValues structure.</param> public override void Parse(Stream s) { base.Parse(s); this.StorageManifestRootDeclare = new bit16StreamObjectHeaderStart(); this.StorageManifestRootDeclare.Parse(s); this.RootExtendedGUID = new ExtendedGUID(); this.RootExtendedGUID = this.RootExtendedGUID.TryParse(s); this.CellID = new CellID(); this.CellID.Parse(s); }
/// <summary> /// Parse the PutChangesRequest structure. /// </summary> /// <param name="s">An stream containing PutChangesRequest structure.</param> public override void Parse(Stream s) { base.Parse(s); this.putChangesRequest = new bit32StreamObjectHeaderStart(); this.putChangesRequest.Parse(s); this.StorageIndexExtendedGUID = new ExtendedGUID(); this.StorageIndexExtendedGUID = this.StorageIndexExtendedGUID.TryParse(s); this.ExpectedStorageIndexExtendedGUID = new ExtendedGUID(); this.ExpectedStorageIndexExtendedGUID = this.ExpectedStorageIndexExtendedGUID.TryParse(s); byte tempByte = ReadByte(); this.A = (byte)GetBits(tempByte, 0, 1); this.B = (byte)GetBits(tempByte, 1, 1); this.C = (byte)GetBits(tempByte, 2, 1); this.D = (byte)GetBits(tempByte, 3, 1); this.E = (byte)GetBits(tempByte, 4, 1); this.F = (byte)GetBits(tempByte, 5, 1); this.G = (byte)GetBits(tempByte, 6, 1); this.H = (byte)GetBits(tempByte, 7, 1); if (ContainsStreamObjectHeader(0x86)) { this.AdditionalFlags = new AdditionalFlags(); this.AdditionalFlags.Parse(s); } if (ContainsStreamObjectHeader(0x85)) { this.LockId = new LockId(); this.LockId.Parse(s); } if (ContainsStreamObjectHeader(0x10)) { this.ClientKnowledge = new Knowledge(); this.ClientKnowledge.Parse(s); } if (ContainsStreamObjectHeader(0x8A)) { this.DiagnosticRequestOptionInput = new DiagnosticRequestOptionInput(); this.DiagnosticRequestOptionInput.Parse(s); } }
/// <summary> /// Parse the CellID structure. /// </summary> /// <param name="s">An stream containing CellID structure.</param> public override void Parse(Stream s) { base.Parse(s); this.EXGUID1 = new ExtendedGUID(); this.EXGUID1 = this.EXGUID1.TryParse(s); this.EXGUID2 = new ExtendedGUID(); this.EXGUID2 = this.EXGUID2.TryParse(s); }
/// <summary> /// Parse the CellManifestDataElement structure. /// </summary> /// <param name="s">An stream containing CellManifestDataElement structure.</param> public override void Parse(Stream s) { base.Parse(s); this.DataElementStart = new bit16StreamObjectHeaderStart(); this.DataElementStart.Parse(s); this.DataElementExtendedGUID = new ExtendedGUID(); this.DataElementExtendedGUID = this.DataElementExtendedGUID.TryParse(s); this.SerialNumber = new SerialNumber(); this.SerialNumber = this.SerialNumber.TryParse(s); this.DataElementType = new CompactUnsigned64bitInteger(); this.DataElementType = this.DataElementType.TryParse(s); this.CellManifestCurrentRevision = new bit16StreamObjectHeaderStart(); this.CellManifestCurrentRevision.Parse(s); this.CellManifestCurrentRevisionExtendedGUID = new ExtendedGUID(); this.CellManifestCurrentRevisionExtendedGUID = this.CellManifestCurrentRevisionExtendedGUID.TryParse(s); this.DataElementEnd = new bit8StreamObjectHeaderEnd(); this.DataElementEnd.Parse(s); }