/// <summary> /// Deserialize fields from a FastTransferStream. /// </summary> /// <param name="stream">A FastTransferStream.</param> public override void Deserialize(FastTransferStream stream) { if (GroupInfo.Verify(stream)) { this.groupInfo = new GroupInfo(stream); } if (stream.VerifyMetaProperty(MetaProperties.MetaTagIncrSyncGroupId)) { stream.ReadMarker(); this.incrSyncGroupId = stream.ReadUInt32(); } if (stream.ReadMarker(Markers.PidTagIncrSyncChgPartial)) { this.messageChangeHeader = new MessageChangeHeader(stream); this.propListList = new List <PropList>(); while (stream.VerifyMetaProperty(MetaProperties.MetaTagIncrementalSyncMessagePartial)) { stream.ReadMarker(); this.incrementalSyncMessagePartial = stream.ReadUInt32(); this.propListList.Add(new PropList(stream)); } this.MessageChildren = new MessageChildren(stream); return; } AdapterHelper.Site.Assert.Fail("The stream cannot be deserialized successfully."); }
/// <summary> /// Deserialize fields from a FastTransferStream. /// </summary> /// <param name="stream">A FastTransferStream.</param> public override void Deserialize(FastTransferStream stream) { int count = 0; this.messages = new List <Message>(); this.errorCodeList = new List <uint>(); do { if (stream.VerifyMetaProperty(MetaProperties.PidTagEcWarning)) { stream.ReadMarker(); this.errorCodeList.Add(stream.ReadUInt32()); return; } if (Message.Verify(stream)) { this.messages.Add(new Message(stream)); } else if (count > 0) { return; } else { AdapterHelper.Site.Assert.Fail("The stream cannot be deserialized successfully."); } count++; }while (Verify(stream)); }
/// <summary> /// Deserialize fields from a FastTransferStream. /// </summary> /// <param name="stream">A FastTransferStream.</param> public override void Deserialize(FastTransferStream stream) { this.fxdelPropsAll = new List <uint>(); this.fxdelPropsBeforeRecipient = new List <uint>(); this.fxdelPropsBeforeAttachment = new List <uint>(); this.attachments = new List <Attachment>(); this.recipients = new List <Recipient>(); while (stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp)) { stream.ReadMarker(); this.fxdelPropsBeforeRecipient.Add(stream.ReadUInt32()); } if (Recipient.Verify(stream)) { this.recipients = new List <Recipient>(); while (Recipient.Verify(stream)) { this.recipients.Add(new Recipient(stream)); } } while (stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp)) { stream.ReadMarker(); this.fxdelPropsBeforeAttachment.Add(stream.ReadUInt32()); } while (Attachment.Verify(stream)) { this.attachments.Add(new Attachment(stream)); } for (int i = 0; i < this.fxdelPropsBeforeRecipient.Count; i++) { this.fxdelPropsAll.Add(this.fxdelPropsBeforeRecipient[i]); } for (int i = 0; i < this.fxdelPropsBeforeAttachment.Count; i++) { this.fxdelPropsAll.Add(this.fxdelPropsBeforeAttachment[i]); } }
/// <summary> /// Deserialize fields from a FastTransferStream. /// </summary> /// <param name="stream">A FastTransferStream.</param> public override void Deserialize(FastTransferStream stream) { int count = 0; long lastPosi = stream.Position; this.fxdelPropList = new List <uint>(); this.messageLists = new List <MessageList>(); this.messageTupleList = new List <Tuple <List <uint>, MessageList> >(); while (!stream.IsEndOfStream && count < 2) { lastPosi = stream.Position; List <uint> metaProps = new List <uint>(); while (stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp)) { stream.ReadMarker(); uint delProp = stream.ReadUInt32(); metaProps.Add(delProp); } if (MessageList.Verify(stream)) { MessageList msgList = new MessageList(stream); this.messageLists.Add(msgList); this.fxdelPropList.AddRange(metaProps); this.messageTupleList.Add(new Tuple <List <uint>, MessageList>( metaProps, msgList)); } else { stream.Position = lastPosi; break; } count++; } }
/// <summary> /// Deserialize fields from a FastTransferStream. /// </summary> /// <param name="stream">A FastTransferStream.</param> public override void Deserialize(FastTransferStream stream) { int count = 0; this.messages = new List<Message>(); this.errorCodeList = new List<uint>(); do { if (stream.VerifyMetaProperty(MetaProperties.PidTagEcWarning)) { stream.ReadMarker(); this.errorCodeList.Add(stream.ReadUInt32()); return; } if (Message.Verify(stream)) { this.messages.Add(new Message(stream)); } else if (count > 0) { return; } else { AdapterHelper.Site.Assert.Fail("The stream cannot be deserialized successfully."); } count++; } while (Verify(stream)); }
/// <summary> /// Deserialize fields from a FastTransferStream. /// </summary> /// <param name="stream">A FastTransferStream.</param> public override void Deserialize(FastTransferStream stream) { if (GroupInfo.Verify(stream)) { this.groupInfo = new GroupInfo(stream); } if (stream.VerifyMetaProperty(MetaProperties.MetaTagIncrSyncGroupId)) { stream.ReadMarker(); this.incrSyncGroupId = stream.ReadUInt32(); } if (stream.ReadMarker(Markers.PidTagIncrSyncChgPartial)) { this.messageChangeHeader = new MessageChangeHeader(stream); this.propListList = new List<PropList>(); while (stream.VerifyMetaProperty(MetaProperties.MetaTagIncrementalSyncMessagePartial)) { stream.ReadMarker(); this.incrementalSyncMessagePartial = stream.ReadUInt32(); this.propListList.Add(new PropList(stream)); } this.MessageChildren = new MessageChildren(stream); return; } AdapterHelper.Site.Assert.Fail("The stream cannot be deserialized successfully."); }
/// <summary> /// Verify that a stream's current position contains a serialized MessageChangePartial. /// </summary> /// <param name="stream">A FastTransferStream.</param> /// <returns>If the stream's current position contains /// a serialized MessageChangePartial, return true, else false.</returns> public static new bool Verify(FastTransferStream stream) { return GroupInfo.Verify(stream) || stream.VerifyMetaProperty(MetaProperties.MetaTagIncrSyncGroupId) || stream.VerifyMarker(Markers.PidTagIncrSyncChgPartial); }
/// <summary> /// Verify that a stream's current position contains a serialized folderMessages /// </summary> /// <param name="stream">A FastTransferStream.</param> /// <returns>If the stream's current position contains /// a serialized folderMessages, return true, else false.</returns> public static bool Verify(FastTransferStream stream) { return(!stream.IsEndOfStream || stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp) || MessageList.Verify(stream)); }
/// <summary> /// Deserialize fields from a FastTransferStream. /// </summary> /// <param name="stream">A FastTransferStream.</param> public override void Deserialize(FastTransferStream stream) { this.fxdelPropsAll = new List<uint>(); this.fxdelPropsBeforeRecipient = new List<uint>(); this.fxdelPropsBeforeAttachment = new List<uint>(); this.attachments = new List<Attachment>(); this.recipients = new List<Recipient>(); while (stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp)) { stream.ReadMarker(); this.fxdelPropsBeforeRecipient.Add(stream.ReadUInt32()); } if (Recipient.Verify(stream)) { this.recipients = new List<Recipient>(); while (Recipient.Verify(stream)) { this.recipients.Add(new Recipient(stream)); } } while (stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp)) { stream.ReadMarker(); this.fxdelPropsBeforeAttachment.Add(stream.ReadUInt32()); } while (Attachment.Verify(stream)) { this.attachments.Add(new Attachment(stream)); } for (int i = 0; i < this.fxdelPropsBeforeRecipient.Count; i++) { this.fxdelPropsAll.Add(this.fxdelPropsBeforeRecipient[i]); } for (int i = 0; i < this.fxdelPropsBeforeAttachment.Count; i++) { this.fxdelPropsAll.Add(this.fxdelPropsBeforeAttachment[i]); } }
/// <summary> /// Verify that a stream's current position contains a serialized MessageChangePartial. /// </summary> /// <param name="stream">A FastTransferStream.</param> /// <returns>If the stream's current position contains /// a serialized MessageChangePartial, return true, else false.</returns> public static new bool Verify(FastTransferStream stream) { return(GroupInfo.Verify(stream) || stream.VerifyMetaProperty(MetaProperties.MetaTagIncrSyncGroupId) || stream.VerifyMarker(Markers.PidTagIncrSyncChgPartial)); }
/// <summary> /// Deserialize fields from a FastTransferStream. /// </summary> /// <param name="stream">A FastTransferStream.</param> public override void Deserialize(FastTransferStream stream) { // Actual stream deserialization: // folderContent = propList [PidTagEcWarning] // ( (*(*PidTagFXDelProp PidTagNewFXFolder)) / folderMessages ) // [ *PidTagFXDelProp *SubFolder ] this.warningCode = null; this.fxdelPropList = new List<uint>(); this.newFXFolderList = new List<Tuple<List<uint>, MS_OXCFXICS.FolderReplicaInfo>>(); this.propList = new PropList(stream); if (!stream.IsEndOfStream) { uint marker = stream.VerifyUInt32(); if (marker == (uint)MetaProperties.PidTagEcWarning) { marker = stream.ReadUInt32(); this.warningCode = stream.ReadUInt32(); marker = stream.VerifyUInt32(); } long lastPosi = stream.Position; while (stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp) || stream.VerifyMetaProperty(MetaProperties.PidTagNewFXFolder)) { lastPosi = stream.Position; List<uint> tempFXdel = new List<uint>(); while (stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp)) { stream.ReadMetaProperty(MetaProperties.PidTagFXDelProp); uint prop = stream.ReadUInt32(); tempFXdel.Add(prop); } if (!stream.IsEndOfStream) { marker = stream.VerifyUInt32(); } if (marker == (uint)MetaProperties.PidTagNewFXFolder) { marker = stream.ReadUInt32(); stream.ReadUInt32(); FolderReplicaInfo fri = new FolderReplicaInfo(stream); this.newFXFolderList.Add( new Tuple<List<uint>, FolderReplicaInfo>( tempFXdel, fri)); } else { stream.Position = lastPosi; marker = stream.VerifyUInt32(); break; } } if (FolderMessages.Verify(stream)) { this.folderMessages = new FolderMessages(stream); } this.subFolders = new List<SubFolder>(); while (stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp)) { stream.ReadMetaProperty(MetaProperties.PidTagFXDelProp); uint prop = stream.ReadUInt32(); this.fxdelPropList.Add(prop); } while (SubFolder.Verify(stream)) { this.subFolders.Add(new SubFolder(stream)); } } }
/// <summary> /// Deserialize fields from a FastTransferStream. /// </summary> /// <param name="stream">A FastTransferStream.</param> public override void Deserialize(FastTransferStream stream) { int count = 0; long lastPosi = stream.Position; this.fxdelPropList = new List<uint>(); this.messageLists = new List<MessageList>(); this.messageTupleList = new List<Tuple<List<uint>, MessageList>>(); while (!stream.IsEndOfStream && count < 2) { lastPosi = stream.Position; List<uint> metaProps = new List<uint>(); while (stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp)) { stream.ReadMarker(); uint delProp = stream.ReadUInt32(); metaProps.Add(delProp); } if (MessageList.Verify(stream)) { MessageList msgList = new MessageList(stream); this.messageLists.Add(msgList); this.fxdelPropList.AddRange(metaProps); this.messageTupleList.Add(new Tuple<List<uint>, MessageList>( metaProps, msgList)); } else { stream.Position = lastPosi; break; } count++; } }
/// <summary> /// Verify that a stream's current position contains a serialized folderMessages /// </summary> /// <param name="stream">A FastTransferStream.</param> /// <returns>If the stream's current position contains /// a serialized folderMessages, return true, else false.</returns> public static bool Verify(FastTransferStream stream) { return !stream.IsEndOfStream || stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp) || MessageList.Verify(stream); }
/// <summary> /// Deserialize fields from a FastTransferStream. /// </summary> /// <param name="stream">A FastTransferStream.</param> public override void Deserialize(FastTransferStream stream) { // Actual stream deserialization: // folderContent = propList [PidTagEcWarning] // ( (*(*PidTagFXDelProp PidTagNewFXFolder)) / folderMessages ) // [ *PidTagFXDelProp *SubFolder ] this.warningCode = null; this.fxdelPropList = new List <uint>(); this.newFXFolderList = new List <Tuple <List <uint>, MS_OXCFXICS.FolderReplicaInfo> >(); this.propList = new PropList(stream); if (!stream.IsEndOfStream) { uint marker = stream.VerifyUInt32(); if (marker == (uint)MetaProperties.PidTagEcWarning) { marker = stream.ReadUInt32(); this.warningCode = stream.ReadUInt32(); marker = stream.VerifyUInt32(); } long lastPosi = stream.Position; while (stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp) || stream.VerifyMetaProperty(MetaProperties.PidTagNewFXFolder)) { lastPosi = stream.Position; List <uint> tempFXdel = new List <uint>(); while (stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp)) { stream.ReadMetaProperty(MetaProperties.PidTagFXDelProp); uint prop = stream.ReadUInt32(); tempFXdel.Add(prop); } if (!stream.IsEndOfStream) { marker = stream.VerifyUInt32(); } if (marker == (uint)MetaProperties.PidTagNewFXFolder) { marker = stream.ReadUInt32(); stream.ReadUInt32(); FolderReplicaInfo fri = new FolderReplicaInfo(stream); this.newFXFolderList.Add( new Tuple <List <uint>, FolderReplicaInfo>( tempFXdel, fri)); } else { stream.Position = lastPosi; marker = stream.VerifyUInt32(); break; } } if (FolderMessages.Verify(stream)) { this.folderMessages = new FolderMessages(stream); } this.subFolders = new List <SubFolder>(); while (stream.VerifyMetaProperty(MetaProperties.PidTagFXDelProp)) { stream.ReadMetaProperty(MetaProperties.PidTagFXDelProp); uint prop = stream.ReadUInt32(); this.fxdelPropList.Add(prop); } while (SubFolder.Verify(stream)) { this.subFolders.Add(new SubFolder(stream)); } } }