StoreAvailability 類別

定義

代表可購買之產品 SKU 的特定實例。

public ref class StoreAvailability sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Services.Store.StoreContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class StoreAvailability final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Services.Store.StoreContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class StoreAvailability
Public NotInheritable Class StoreAvailability
繼承
Object Platform::Object IInspectable StoreAvailability
屬性

Windows 需求

裝置系列
Windows 10 Anniversary Edition (已於 10.0.14393.0 引進)
API contract
Windows.Services.Store.StoreContract (已於 v1.0 引進)

備註

市集中的產品會組織在 產品SKU可用性 物件的階層中。 產品是由 StoreProduct 物件表示。 每個產品的 SKU 是由 StoreSku 物件表示,而每個 SKU 的可用性則由 StoreAvailability 物件表示。 如需詳細資訊,請參閱 App 內購買和試用版

若要存取 SKU 可用性,請使用您感興趣的StoreSku物件的Availabilities屬性。

屬性

EndDate

取得目前 SKU 可用性的結束日期。

ExtendedJsonData

從 JSON 格式的市集取得目前 SKU 可用性的完整資料。

Price

取得目前 SKU 可用性的價格資訊,包括基本價格、目前價格和銷售資訊。

StoreId

從 Microsoft Store 目錄取得目前 SKU 可用性的市集識別碼。

方法

RequestPurchaseAsync()

要求購買目前的 SKU 可用性,並顯示用來透過 Microsoft Store 完成交易的 UI。

重要

這個方法必須在 UI 執行緒上呼叫。

RequestPurchaseAsync(StorePurchaseProperties)

要求購買目前的 SKU 可用性,並顯示用來透過 Microsoft Store 完成交易的 UI。 這個方法提供選項,以在 Microsoft Store 中的單一清單所代表的大型產品目錄中,指定特定供應專案的其他詳細資料,包括在購買期間向使用者顯示的產品名稱。

重要

這個方法必須在 UI 執行緒上呼叫。

適用於

另請參閱