PackagePart.GetStreamCore(FileMode, FileAccess) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在派生类中重写时,返回用指定的 FileMode 和 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
参数
- mode
- FileMode
打开内容流的 I/O 模式。
- access
- FileAccess
打开内容流时要使用的访问权限。
返回
部件的内容数据流。
注解
应用程序不应直接调用 GetStreamCore ,而是应调用 GetStream。
实施者说明
派生 GetStreamCore(FileMode, FileAccess) 实现不应假设调用 GetStream 它的方法执行的顺序或操作。
调用方说明
派生 GetStreamCore(FileMode, FileAccess) 方法由 GetStream 方法调用,以基于派生类中实现的物理格式打开和返回部件数据流。
默认情况下, ZipPackagePart 提供和使用抽象 PackagePart 类的子类实现。 在默认操作中,GetStream在内部调用GetStreamCore(FileMode, FileAccess)ZipPackagePart类以打开并返回 ZIP 文件中的部分数据流。