C# Class PhotoSharingApp.Universal.Facades.LicensingFacade

Encapsulates In-app purchases.
Inheritance: ILicensingFacade
Mostrar archivo Open project: Microsoft/Appsample-Photosharing

Public Methods

Method Description
LicensingFacade ( IPhotoService photoService, IAuthEnforcementHandler authEnforcementHandler ) : System
PurchaseGold ( string productId ) : System.Threading.Tasks.Task

Purchases Gold with the given productId.

Please see InAppPurchases for available IAPs.

Private Methods

Method Description
DoFulfillment ( ) : System.Threading.Tasks.Task

Does fulfillment of all available products.

Fulfillment consists of two steps: 1. Notifying PhotoSharingApp servers of purchased IAP. 2. In case of a consumable, we want to fulfill that IAP in the store so that users are able to re-purchase.

TryFulfillGold ( ProductLicense productLicense ) : System.Threading.Tasks.Task

Tries to fulfill a Gold IAP with the given amount.

Method Details

LicensingFacade() public method

public LicensingFacade ( IPhotoService photoService, IAuthEnforcementHandler authEnforcementHandler ) : System
photoService IPhotoService
authEnforcementHandler IAuthEnforcementHandler
return System

PurchaseGold() public method

Purchases Gold with the given productId.
Please see InAppPurchases for available IAPs.
Thrown when an error occurs during purchase.
public PurchaseGold ( string productId ) : System.Threading.Tasks.Task
productId string The productId to purchase.
return System.Threading.Tasks.Task