Verify() public static method

Verify that a stream's current position contains a serialized messageChangeFull.
public static Verify ( FastTransferStream stream ) : bool
stream FastTransferStream A FastTransferStream.
return bool
Exemplo n.º 1
0
 /// <summary>
 /// Deserialize a messageChange from a stream.
 /// </summary>
 /// <param name="stream">A FastTransferStream.</param>
 /// <returns>A messageChange object.</returns>
 public static SyntacticalBase DeserializeFrom(FastTransferStream stream)
 {
     if (MessageChangeFull.Verify(stream))
     {
         return(new MessageChangeFull(stream));
     }
     else if (MessageChangePartial.Verify(stream))
     {
         return(new MessageChangePartial(stream));
     }
     else
     {
         AdapterHelper.Site.Assert.Fail("The stream cannot be deserialized successfully.");
         return(null);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Verify that a stream's current position contains a serialized messageChange.
 /// </summary>
 /// <param name="stream">A FastTransferStream.</param>
 /// <returns>If the stream's current position contains
 /// a serialized messageChange, return true, else false</returns>
 public static bool Verify(FastTransferStream stream)
 {
     return(MessageChangeFull.Verify(stream) ||
            MessageChangePartial.Verify(stream));
 }