BuildProvider.OpenStream 方法

定义

打开流以从虚拟路径读取。Opens a stream for reading from a virtual path.

重载

OpenStream()

打开流以读取当前生成提供程序对象的虚拟路径。Opens a stream for reading the virtual path of the current build provider object.

OpenStream(String)

打开流以从指定的虚拟路径读取。Opens a stream for reading from a specified virtual path.

OpenStream()

打开流以读取当前生成提供程序对象的虚拟路径。Opens a stream for reading the virtual path of the current build provider object.

protected:
 System::IO::Stream ^ OpenStream();
protected System.IO.Stream OpenStream ();
member this.OpenStream : unit -> System.IO.Stream
Protected Function OpenStream () As Stream

返回

Stream

打开的 Stream,可用于读取 VirtualPath 的内容。An open Stream that can be used to read the contents of the VirtualPath.

注解

Read 返回的对象使用方法 Stream ,以读取对象的虚拟路径的内容 BuildProviderUse the Read method on the returned Stream object to read the contents of the virtual path for the BuildProvider object.

调用方法后 OpenStream ,必须使用 Close 方法关闭 Stream 对象并释放关联的系统资源。After calling the OpenStream method, you must use the Close method to close the Stream object and free associated system resources.

另请参阅

适用于

OpenStream(String)

打开流以从指定的虚拟路径读取。Opens a stream for reading from a specified virtual path.

protected:
 System::IO::Stream ^ OpenStream(System::String ^ virtualPath);
protected System.IO.Stream OpenStream (string virtualPath);
member this.OpenStream : string -> System.IO.Stream
Protected Function OpenStream (virtualPath As String) As Stream

参数

virtualPath
String

要读取的虚拟路径。The virtual path to read.

返回

Stream

打开的 Stream,可用于读取指定的虚拟路径的内容。An open Stream that can be used to read the contents of the specified virtual path.

注解

Read 返回的对象使用方法 Stream ,以读取虚拟路径的内容。Use the Read method on the returned Stream object to read the contents of the virtual path.

调用方法后 OpenStream ,必须使用 Close 方法关闭 Stream 对象并释放关联的系统资源。After calling the OpenStream method, you must use the Close method to close the Stream object and free associated system resources.

另请参阅

适用于