Verify() public static méthode

Verify that a stream's current position contains a serialized state.
public static Verify ( FastTransferStream stream ) : bool
stream FastTransferStream A FastTransferStream.
Résultat bool
Exemple #1
0
 /// <summary>
 /// Verify that a stream's current position contains a serialized hierarchySync.
 /// </summary>
 /// <param name="stream">A FastTransferStream.</param>
 /// <returns>If the stream's current position contains
 /// a serialized hierarchySync, return true, else false.</returns>
 public static bool Verify(FastTransferStream stream)
 {
     return((FolderChange.Verify(stream) ||
             Deletions.Verify(stream) ||
             State.Verify(stream)) &&
            stream.VerifyMarker(
                Markers.PidTagIncrSyncEnd,
                (int)stream.Length - MarkersHelper.PidTagLength - (int)stream.Position));
 }
Exemple #2
0
 /// <summary>
 /// Verify that a stream's current position contains a serialized contentsSync.
 /// </summary>
 /// <param name="stream">A FastTransferStream.</param>
 /// <returns>If the stream's current position contains
 /// a serialized contentsSync, return true, else false.</returns>
 public static bool Verify(FastTransferStream stream)
 {
     return((ProgressTotal.Verify(stream) ||
             ProgressPerMessage.Verify(stream) ||
             MessageChange.Verify(stream) ||
             Deletions.Verify(stream) ||
             ReadStateChanges.Verify(stream) ||
             State.Verify(stream)) &&
            stream.VerifyMarker(
                EndMarker,
                (int)stream.Length - MarkersHelper.PidTagLength - (int)stream.Position));
 }