Share via


WalletItemStore.GetWalletItemAsync(String) 方法

定义

注意

ApplicationModel.Wallet 命名空间不再受支持,不久将弃用。 建议开发人员避免使用此命名空间。

从电子钱包数据库获取具有给定 ID 的单个钱包项。 请求的项必须归此应用所有。

public:
 virtual IAsyncOperation<WalletItem ^> ^ GetWalletItemAsync(Platform::String ^ id) = GetWalletItemAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<WalletItem> GetWalletItemAsync(winrt::hstring const& id);
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("IWalletItemStore is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 917504, "Windows.Foundation.UniversalApiContract")]
IAsyncOperation<WalletItem> GetWalletItemAsync(winrt::hstring const& id);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<WalletItem> GetWalletItemAsync(string id);
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("IWalletItemStore is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 917504, "Windows.Foundation.UniversalApiContract")]
public IAsyncOperation<WalletItem> GetWalletItemAsync(string id);
function getWalletItemAsync(id)
Public Function GetWalletItemAsync (id As String) As IAsyncOperation(Of WalletItem)

参数

id
String

Platform::String

winrt::hstring

钱包项的 ID。

返回

一个异步操作,该操作在成功完成后返回具有此应用拥有的指定 ID 的钱包项目。 如果使用 异步编程,则结果类型为单个 WalletItem。 如果在当前 WalletItemStore 中找不到此应用具有指定 ID 的项目,或者该项目不归此应用所有,则结果为 null

属性

适用于

另请参阅