StreamedFileDataRequest Class
表示指示通过调用 CreateStreamedFileAsync 或 ReplaceWithStreamedFileAsync 创建的 StorageFile 数据流请求的顺序访问输出流。
语法
public sealed class StreamedFileDataRequest : Object, IOutputStream, IDisposable, IStreamedFileDataRequest
特性
- MarshalingBehaviorAttribute(Agile)
- VersionAttribute(NTDDI_WIN8)
成员
StreamedFileDataRequest类 具有以下类型的成员:
方法
The StreamedFileDataRequest 类 具有以下方法。 使用 C#、Visual Basic 和 C++,它还可以继承以下内容中的方法 Object 类.
| 方法 | 描述 |
|---|---|
| Close | Releases system resources that are exposed by the current stream indicating that the data request is complete. |
| Dispose | Performs tasks associated with freeing, releasing, or resetting unmanaged resources. |
| FailAndClose | Indicates that the data can't be streamed and releases system resources that are exposed by the current stream indicating that the data request is complete. |
| FlushAsync | Flushes the data in the current stream. |
| WriteAsync | Writes data from a buffer to the current stream. |
备注
当访问由 StorageFile 表示的流时,此对象被传递给应用程序的 StreamedFileDataRequestedHandler 函数。如果您使用 CreateStreamedFileAsync 或 ReplaceWithStreamedFileAsync 以获取表示流的 StorageFile,则请定义 StreamedFileDataRequestedHandler 函数。
Windows Phone 8
此 API 不实现,并且在调用时会引发异常。
要求
|
最低受支持的客户端 | Windows 8 [仅 Windows 应用商店应用] |
|---|---|
|
最低受支持的服务器 | Windows Server 2012 [仅 Windows 应用商店应用] |
|
最低受支持的电话 | Windows Phone 8 |
|
命名空间 |
|
|
元数据 |
|