Editar

Compartilhar via


PackagePart.GetStreamCore(FileMode, FileAccess) Method

Definition

When overridden in a derived class, returns the part content stream opened with a specified FileMode and FileAccess.

protected:
 abstract System::IO::Stream ^ GetStreamCore(System::IO::FileMode mode, System::IO::FileAccess access);
protected abstract System.IO.Stream? GetStreamCore (System.IO.FileMode mode, System.IO.FileAccess access);
protected abstract System.IO.Stream GetStreamCore (System.IO.FileMode mode, System.IO.FileAccess access);
abstract member GetStreamCore : System.IO.FileMode * System.IO.FileAccess -> System.IO.Stream
Protected MustOverride Function GetStreamCore (mode As FileMode, access As FileAccess) As Stream

Parameters

mode
FileMode

The I/O mode in which to open the content stream.

access
FileAccess

The access permissions to use in opening the content stream.

Returns

The content data stream of the part.

Remarks

Applications should not call GetStreamCore directly, but instead should call GetStream.

Notes to Implementers

The derived GetStreamCore(FileMode, FileAccess) implementation should make no assumptions about the order or operations performed by the GetStream method that calls it.

Notes to Callers

The derived GetStreamCore(FileMode, FileAccess) method is called by the GetStream methods to open and return the part data stream based on the physical format implemented in the derived class.

By default, the ZipPackagePart subclass implementation of the abstract PackagePart class is provided and used. In the default operation, GetStream internally calls GetStreamCore(FileMode, FileAccess) of the ZipPackagePart class to open and return the part data stream from a ZIP file.

Applies to