Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize
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.

StorageStreamTransaction class

Represents a write transaction for a random-access stream.

Syntax


public ref class StorageStreamTransaction sealed : IClosable

Members

The StorageStreamTransaction class has these types of members:

Methods

The StorageStreamTransaction class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Close [C++, JavaScript]Releases system resources that are exposed by the stream, indicating that the data request is complete.
CommitAsync Save the stream to the underlying file.
Dispose [C#, VB]Performs tasks associated with freeing, releasing, or resetting unmanaged resources.

 

Properties

The StorageStreamTransaction class has these properties.

PropertyAccess typeDescription

Stream

Read-onlyGets the random-access stream used in the transaction.

 

Examples

The File Access sample shows you how to use a StorageStreamTransaction object to perform a transacted write operation on a file.

No code example is currently available or this language may not be supported.

In the example, file is a local variable that contains a storageFile that represents the file to write.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Storage
Windows::Storage [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8

Namespace

Windows.Storage
Windows::Storage [C++]

Metadata

Windows.winmd

Attributes

[Version(0x06020000)]

See also

File Access sample
Object
IClosable

 

 

Show:
© 2015 Microsoft