共用方式為


GameSaveContainer.ReadAsync(IMapView<String,IBuffer>) 方法

定義

從此容器讀取 Blob,如 blobsToRead所指定。 傳入 blobsToRead 的緩衝區必須夠大,才能儲存 Blob 資料。

public:
 virtual IAsyncOperation<GameSaveOperationResult ^> ^ ReadAsync(IMapView<Platform::String ^, IBuffer ^> ^ blobsToWrite) = ReadAsync;
public:
 virtual IAsyncOperation<GameSaveOperationResult ^> ^ ReadAsync(IMapView<Platform::String ^, IBuffer ^> ^ blobsToRead) = ReadAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<GameSaveOperationResult> ReadAsync(IMapView<winrt::hstring, IBuffer const&> const& blobsToWrite);
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<GameSaveOperationResult> ReadAsync(IMapView<winrt::hstring, IBuffer const&> const& blobsToRead);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<GameSaveOperationResult> ReadAsync(IReadOnlyDictionary<string,IBuffer> blobsToWrite);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<GameSaveOperationResult> ReadAsync(IReadOnlyDictionary<string,IBuffer> blobsToRead);
function readAsync(blobsToWrite)
function readAsync(blobsToRead)
Public Function ReadAsync (blobsToWrite As IReadOnlyDictionary(Of String, IBuffer)) As IAsyncOperation(Of GameSaveOperationResult)
Public Function ReadAsync (blobsToRead As IReadOnlyDictionary(Of String, IBuffer)) As IAsyncOperation(Of GameSaveOperationResult)

參數

blobsToWriteblobsToRead

IMapView<String,IBuffer>

IReadOnlyDictionary<String,IBuffer>

IMapView<Platform::String,IBuffer>

IMapView<winrt::hstring,IBuffer>

傳回

類型: IAsyncOperation < ;GameSaveOperationResult > ;

IAsyncOperation < ;GameSaveOperationResult > ; 代表非同步作業的狀態。

屬性

備註

使用 GameSaveBlobInfoQuery 來判斷每個所要求的遊戲儲存 Blob 所需的緩衝區大小。

如果作業順利完成,傳回緩衝區的 length 屬性會指定每個緩衝區中包含的資料量。

ReadAsyncGetAsync 不同,因為 GetAsync 會自動為 Blob 資料配置必要的緩衝區,並在 GameSaveBlobGetResult 物件中傳回該資料。 ReadAsync 會改為直接寫入 BlobsToRead 參數中傳遞的緩衝區。

非同步作業完成之後,請檢查結果的 Status 屬性,以判斷作業是否成功與 GameSaveErrorStatus.Ok

適用於

另請參閱