Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PackagePart.GetStreamCore Method (FileMode, FileAccess)

 

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

Namespace:   System.IO.Packaging
Assembly:  WindowsBase (in WindowsBase.dll)

protected abstract Stream GetStreamCore(
	FileMode mode,
	FileAccess access
)

Parameters

mode
Type: System.IO.FileMode

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

access
Type: System.IO.FileAccess

The access permissions to use in opening the content stream.

Return Value

Type: System.IO.Stream

The content data stream of the part.

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

Notes to Implementers:

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

Notes to Callers:

The derived GetStreamCore 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 of the ZipPackagePart class to open and return the part data stream from a ZIP file.

.NET Framework
Available since 3.0
Return to top
Show: