public byte[] ToByteArray() { byte[] result = null; using (BackSyncCookieWriter backSyncCookieWriter = BackSyncCookieWriter.Create(typeof(ObjectFullSyncPageToken))) { backSyncCookieWriter.WriteNextAttributeValue(this.Version); backSyncCookieWriter.WriteNextAttributeValue(this.ServiceInstanceId.InstanceId); backSyncCookieWriter.WriteNextAttributeValue(this.Timestamp.ToBinary()); backSyncCookieWriter.WriteNextAttributeValue(this.LastReadFailureStartTime.ToBinary()); backSyncCookieWriter.WriteNextAttributeValue(this.InvocationId); backSyncCookieWriter.WriteNextAttributeValue((int)this.SyncOptions); List <string> list = new List <string>(); foreach (SyncObjectId syncObjectId in this.ObjectIds) { list.Add(syncObjectId.ToString()); } backSyncCookieWriter.WriteNextAttributeValue(list.ToArray()); if (this.ObjectCookie != null) { backSyncCookieWriter.WriteNextAttributeValue(this.ObjectCookie.ToByteArray()); } else { backSyncCookieWriter.WriteNextAttributeValue(null); } string[] attributeValue = BackSyncCookie.ConvertErrorObjectsAndFailureCountsToArray(this.ErrorObjectsAndFailureCounts); backSyncCookieWriter.WriteNextAttributeValue(attributeValue); backSyncCookieWriter.WriteNextAttributeValue(this.SequenceStartTimestamp.ToBinary()); backSyncCookieWriter.WriteNextAttributeValue(this.SequenceId); result = backSyncCookieWriter.GetBinaryCookie(); } return(result); }
public virtual byte[] ToByteArray() { byte[] result = null; using (BackSyncCookieWriter backSyncCookieWriter = BackSyncCookieWriter.Create(typeof(TenantFullSyncPageToken))) { backSyncCookieWriter.WriteNextAttributeValue(this.Version); backSyncCookieWriter.WriteNextAttributeValue(this.ServiceInstanceId.InstanceId); backSyncCookieWriter.WriteNextAttributeValue(this.Timestamp.ToBinary()); backSyncCookieWriter.WriteNextAttributeValue(this.LastReadFailureStartTime.ToBinary()); backSyncCookieWriter.WriteNextAttributeValue(this.InvocationId); backSyncCookieWriter.WriteNextAttributeValue(this.TenantExternalDirectoryId); backSyncCookieWriter.WriteNextAttributeValue(this.TenantObjectGuid); backSyncCookieWriter.WriteNextAttributeValue((int)this.State); backSyncCookieWriter.WriteNextAttributeValue(this.ObjectUpdateSequenceNumber); backSyncCookieWriter.WriteNextAttributeValue(this.TombstoneUpdateSequenceNumber); if (this.PendingWatermarks == null) { backSyncCookieWriter.WriteNextAttributeValue(null); } else { byte[] attributeValue = this.PendingWatermarks.SerializeToBytes(); backSyncCookieWriter.WriteNextAttributeValue(attributeValue); } backSyncCookieWriter.WriteNextAttributeValue(this.PendingWatermarksInvocationId); if (this.Watermarks == null) { backSyncCookieWriter.WriteNextAttributeValue(null); } else { byte[] attributeValue2 = this.Watermarks.SerializeToBytes(); backSyncCookieWriter.WriteNextAttributeValue(attributeValue2); } backSyncCookieWriter.WriteNextAttributeValue(this.WatermarksInvocationId); backSyncCookieWriter.WriteNextAttributeValue(this.LinkPageStart); backSyncCookieWriter.WriteNextAttributeValue(this.LinkPageEnd); backSyncCookieWriter.WriteNextAttributeValue(this.LinkRangeStart); backSyncCookieWriter.WriteNextAttributeValue(this.ObjectsInLinkPage); string[] attributeValue3 = BackSyncCookie.ConvertErrorObjectsAndFailureCountsToArray(this.ErrorObjectsAndFailureCounts); backSyncCookieWriter.WriteNextAttributeValue(attributeValue3); backSyncCookieWriter.WriteNextAttributeValue(this.SequenceStartTimestamp.ToBinary()); backSyncCookieWriter.WriteNextAttributeValue(this.SequenceId); if (this.TenantScopedBackSyncCookie == null) { backSyncCookieWriter.WriteNextAttributeValue(null); } else { byte[] attributeValue4 = this.TenantScopedBackSyncCookie.ToByteArray(); backSyncCookieWriter.WriteNextAttributeValue(attributeValue4); } backSyncCookieWriter.WriteNextAttributeValue(this.UseContainerizedUsnChangedIndex); backSyncCookieWriter.WriteNextAttributeValue(this.SoftDeletedObjectUpdateSequenceNumber); backSyncCookieWriter.WriteNextAttributeValue((int)this.PreviousState); result = backSyncCookieWriter.GetBinaryCookie(); } return(result); }
public byte[] ToByteArray() { ExTraceGlobals.BackSyncTracer.TraceDebug((long)SyncConfiguration.TraceId, "FullSyncObjectCookie.ToByteArray entering"); byte[] result = null; using (BackSyncCookieWriter backSyncCookieWriter = BackSyncCookieWriter.Create(typeof(FullSyncObjectCookie))) { backSyncCookieWriter.WriteNextAttributeValue(this.Version); backSyncCookieWriter.WriteNextAttributeValue(this.ServiceInstanceId.InstanceId); backSyncCookieWriter.WriteNextAttributeValue(this.ObjectId.ToString()); backSyncCookieWriter.WriteNextAttributeValue(this.ReadRestartsCount); backSyncCookieWriter.WriteNextAttributeValue(this.UsnChanged); backSyncCookieWriter.WriteNextAttributeValue(this.EnumerateLinks); backSyncCookieWriter.WriteNextAttributeValue(this.LinkRangeStart); backSyncCookieWriter.WriteNextAttributeValue(this.LinkVersion); backSyncCookieWriter.WriteNextAttributeValue(this.LinkTarget); backSyncCookieWriter.WriteNextAttributeValue(this.LinkName); result = backSyncCookieWriter.GetBinaryCookie(); } return(result); }
// Token: 0x060061E3 RID: 25059 RVA: 0x0014E900 File Offset: 0x0014CB00 public byte[] ToByteArray() { ExTraceGlobals.BackSyncTracer.TraceDebug((long)SyncConfiguration.TraceId, "BackSyncCookie.ToByteArray entering"); byte[] result = null; using (BackSyncCookieWriter backSyncCookieWriter = BackSyncCookieWriter.Create(typeof(BackSyncCookie))) { backSyncCookieWriter.WriteNextAttributeValue(this.Version); backSyncCookieWriter.WriteNextAttributeValue(this.ServiceInstanceId.InstanceId); backSyncCookieWriter.WriteNextAttributeValue(this.Timestamp.ToBinary()); backSyncCookieWriter.WriteNextAttributeValue(this.LastReadFailureStartTime.ToBinary()); backSyncCookieWriter.WriteNextAttributeValue(this.InvocationId); backSyncCookieWriter.WriteNextAttributeValue(this.MoreDirSyncData); backSyncCookieWriter.WriteNextAttributeValue(this.DirSyncCookie); string[] attributeValue = BackSyncCookie.ConvertErrorObjectsAndFailureCountsToArray(this.ErrorObjectsAndFailureCounts); backSyncCookieWriter.WriteNextAttributeValue(attributeValue); backSyncCookieWriter.WriteNextAttributeValue(this.LastWhenChanged.ToBinary()); backSyncCookieWriter.WriteNextAttributeValue(this.LastDirSyncCookieWithReplicationVectors); backSyncCookieWriter.WriteNextAttributeValue(this.SequenceStartTimestamp.ToBinary()); backSyncCookieWriter.WriteNextAttributeValue(this.SequenceId); result = backSyncCookieWriter.GetBinaryCookie(); } return(result); }
public override byte[] ToByteArray() { if (this.MergeState == MergeState.Complete) { ExTraceGlobals.MergeTracer.TraceDebug((long)base.TenantExternalDirectoryId.GetHashCode(), "MergePageToken.ToByteArray this.MergeState is MergeState.Complete."); return(this.BackSyncCookie.ToByteArray()); } ExTraceGlobals.MergeTracer.TraceDebug((long)base.TenantExternalDirectoryId.GetHashCode(), "MergePageToken.ToByteArray create new token ..."); byte[] result = null; using (BackSyncCookieWriter backSyncCookieWriter = BackSyncCookieWriter.Create(typeof(MergePageToken))) { backSyncCookieWriter.WriteNextAttributeValue(base.Version); backSyncCookieWriter.WriteNextAttributeValue(base.ServiceInstanceId.InstanceId); backSyncCookieWriter.WriteNextAttributeValue((int)this.MergeState); byte[] attributeValue = base.ToByteArray(); backSyncCookieWriter.WriteNextAttributeValue(attributeValue); byte[] attributeValue2 = this.BackSyncCookie.ToByteArray(); backSyncCookieWriter.WriteNextAttributeValue(attributeValue2); string[] attributeValue3 = BackSyncCookie.ConvertErrorObjectsAndFailureCountsToArray(base.ErrorObjectsAndFailureCounts); backSyncCookieWriter.WriteNextAttributeValue(attributeValue3); result = backSyncCookieWriter.GetBinaryCookie(); } return(result); }
public virtual byte[] ToByteArray() { byte[] result = null; using (BackSyncCookieWriter backSyncCookieWriter = BackSyncCookieWriter.Create(typeof(TenantRelocationSyncPageToken))) { backSyncCookieWriter.WriteNextAttributeValue(this.Version); backSyncCookieWriter.WriteNextAttributeValue("Exchange/SDF"); backSyncCookieWriter.WriteNextAttributeValue(this.Timestamp.ToBinary()); backSyncCookieWriter.WriteNextAttributeValue(this.LastReadFailureStartTime.ToBinary()); backSyncCookieWriter.WriteNextAttributeValue(this.InvocationId); backSyncCookieWriter.WriteNextAttributeValue(this.TenantConfigUnitObjectGuid); backSyncCookieWriter.WriteNextAttributeValue(this.TenantOrganizationalUnitObjectGuid); backSyncCookieWriter.WriteNextAttributeValue(this.IsTenantConfigUnitInConfigNc); if (this.PartitionHint == null) { backSyncCookieWriter.WriteNextAttributeValue(null); } backSyncCookieWriter.WriteNextAttributeValue(TenantPartitionHint.Serialize(this.PartitionHint)); backSyncCookieWriter.WriteNextAttributeValue((int)this.State); backSyncCookieWriter.WriteNextAttributeValue(this.ConfigUnitObjectUSN); backSyncCookieWriter.WriteNextAttributeValue(this.ConfigUnitTombstoneUSN); backSyncCookieWriter.WriteNextAttributeValue(this.OrganizationalUnitObjectUSN); backSyncCookieWriter.WriteNextAttributeValue(this.OrganizationalUnitTombstoneUSN); backSyncCookieWriter.WriteNextAttributeValue(this.SpecialObjectsUSN); if (this.ConfigNcWatermarks == null) { backSyncCookieWriter.WriteNextAttributeValue(null); } else { byte[] attributeValue = this.ConfigNcWatermarks.SerializeToBytes(); backSyncCookieWriter.WriteNextAttributeValue(attributeValue); } if (this.PendingConfigNcWatermarks == null) { backSyncCookieWriter.WriteNextAttributeValue(null); } else { byte[] attributeValue2 = this.PendingConfigNcWatermarks.SerializeToBytes(); backSyncCookieWriter.WriteNextAttributeValue(attributeValue2); } if (this.Watermarks == null) { backSyncCookieWriter.WriteNextAttributeValue(null); } else { byte[] attributeValue3 = this.Watermarks.SerializeToBytes(); backSyncCookieWriter.WriteNextAttributeValue(attributeValue3); } backSyncCookieWriter.WriteNextAttributeValue(this.WatermarksInvocationId); backSyncCookieWriter.WriteNextAttributeValue(this.PendingWatermarksInvocationId); if (this.PendingWatermarks == null) { backSyncCookieWriter.WriteNextAttributeValue(null); } else { byte[] attributeValue4 = this.PendingWatermarks.SerializeToBytes(); backSyncCookieWriter.WriteNextAttributeValue(attributeValue4); } backSyncCookieWriter.WriteNextAttributeValue(this.LinkPageStart); backSyncCookieWriter.WriteNextAttributeValue(this.LinkPageEnd); backSyncCookieWriter.WriteNextAttributeValue(this.LinkRangeStart); backSyncCookieWriter.WriteNextAttributeValue(this.ObjectsInLinkPage); backSyncCookieWriter.WriteNextAttributeValue(this.AffinityDcFqdn); backSyncCookieWriter.WriteNextAttributeValue(this.AffinityTargetDcFqdn); backSyncCookieWriter.WriteNextAttributeValue(this.PreSyncLdapPagingCookie); result = backSyncCookieWriter.GetBinaryCookie(); } return(result); }