次の方法で共有


VersionedBinaryReader.ReadVersioned Method

Definition

Overloads

ReadVersioned(Int32, VersionedBinaryReader+MultiVersionReadCallback)

Reads from the base stream, with version checking. callback is invoked regardless of the version of the stream. Use this overload if you want to support reading stream versions other than the expected version.

ReadVersioned(Int32, VersionedBinaryReader+ReadCallback, Boolean)

Reads from the base stream, with version checking.

ReadVersioned(Int32, VersionedBinaryReader+MultiVersionReadCallback)

Reads from the base stream, with version checking. callback is invoked regardless of the version of the stream. Use this overload if you want to support reading stream versions other than the expected version.

public:
 void ReadVersioned(int expectedVersion, Microsoft::VisualStudio::Utilities::VersionedBinaryReader::MultiVersionReadCallback ^ callback);
public void ReadVersioned (int expectedVersion, Microsoft.VisualStudio.Utilities.VersionedBinaryReader.MultiVersionReadCallback callback);
member this.ReadVersioned : int * Microsoft.VisualStudio.Utilities.VersionedBinaryReader.MultiVersionReadCallback -> unit
Public Sub ReadVersioned (expectedVersion As Integer, callback As VersionedBinaryReader.MultiVersionReadCallback)

Parameters

expectedVersion
Int32

The expected version of the stream.

callback
VersionedBinaryReader.MultiVersionReadCallback

The delegate that will read the body of the stream

Applies to

ReadVersioned(Int32, VersionedBinaryReader+ReadCallback, Boolean)

Reads from the base stream, with version checking.

public void ReadVersioned (int expectedVersion, Microsoft.VisualStudio.Utilities.VersionedBinaryReader.ReadCallback callback, bool throwOnUnexpectedVersion = false);
member this.ReadVersioned : int * Microsoft.VisualStudio.Utilities.VersionedBinaryReader.ReadCallback * bool -> unit
Public Sub ReadVersioned (expectedVersion As Integer, callback As VersionedBinaryReader.ReadCallback, Optional throwOnUnexpectedVersion As Boolean = false)

Parameters

expectedVersion
Int32

The expected version of the stream. If the actual version doesn't match the expected version, the stream position is advanced beyond the content but callback is not invoked.

callback
VersionedBinaryReader.ReadCallback

The delegate that will read the body of the stream

throwOnUnexpectedVersion
Boolean

True to throw an exception on encountering an unexpected version.

Applies to