public IOSInAppPurchases() { this.transactionObserver = new IOSTransactionObserver(); // 添加交易結果的 Observer SKPaymentQueue.DefaultQueue.AddTransactionObserver(this.transactionObserver); }
public void Dispose() { if (this.transactionObserver != null) { // 移除交易結果的 Observer SKPaymentQueue.DefaultQueue.RemoveTransactionObserver(this.transactionObserver); this.transactionObserver.Dispose(); this.transactionObserver = null; } }