FileSerializer.DeserializeAllItemsWithLengthPrefix<T> Method

Reads a sequence of consecutive length-prefixed items from a stream, using length-prefixed data.
Protected Function DeserializeAllItemsWithLengthPrefix(Of  _ 
T)( _ 
ByVal stream As Stream, _ 
ByVal expectedField As Integer
) As T()
This language is not supported or no code example is available.
protected T[] DeserializeAllItemsWithLengthPrefix<T>( 
Stream stream
int expectedField 
)
This language is not supported or no code example is available.

Type Parameters

T

The type of object to deserialize.

Parameters

stream
Stream

The binary stream containing the serialized records.

expectedField
int

The tag used as a prefix for the type of the object to deserialize.

Return Value

T[]

The array of deserialized objects.

Remarks
 
You can use this method to read an array of objects from a protocol-buffer stream representation. You had to serialize the file header before using this method to guarantee the backward compatibility when reading. The opening and the closing of the stream is delegated to you.

.NET Framework

Supported in: 4.8

In this article

Definition