コード例 #1
0
        static IGooglePlayStoreService BuildGooglePlayStoreServiceAar(IGooglePurchaseCallback googlePurchaseCallback)
        {
            IGoogleCachedQuerySkuDetailsService googleCachedQuerySkuDetailsService = new GoogleCachedQuerySkuDetailsService();
            IGoogleLastKnownProductService      googleLastKnownProductService      = new GoogleLastKnownProductService();
            IGooglePurchaseUpdatedListener      googlePurchaseUpdatedListener      = new GooglePurchaseUpdatedListener(googleLastKnownProductService, googlePurchaseCallback, googleCachedQuerySkuDetailsService);
            IGoogleBillingClient            googleBillingClient          = new GoogleBillingClient(googlePurchaseUpdatedListener);
            IQuerySkuDetailsService         googleQuerySkuDetailsService = new QuerySkuDetailsService(googleBillingClient, googleCachedQuerySkuDetailsService);
            IGooglePurchaseService          purchaseService            = new GooglePurchaseService(googleBillingClient, googlePurchaseCallback, googleQuerySkuDetailsService);
            IGoogleQueryPurchasesService    queryPurchasesService      = new GoogleQueryPurchasesService(googleBillingClient, googleCachedQuerySkuDetailsService);
            IGoogleFinishTransactionService finishTransactionService   = new GoogleFinishTransactionService(googleBillingClient, queryPurchasesService);
            IBillingClientStateListener     billingClientStateListener = new BillingClientStateListener();
            IGooglePriceChangeService       priceChangeService         = new GooglePriceChangeService(googleBillingClient, googleCachedQuerySkuDetailsService);

            IGooglePlayStoreService googlePlayStoreService = new GooglePlayStoreService(
                googleBillingClient,
                googleQuerySkuDetailsService,
                purchaseService,
                finishTransactionService,
                queryPurchasesService,
                billingClientStateListener,
                priceChangeService,
                googleLastKnownProductService
                );

            return(googlePlayStoreService);
        }
コード例 #2
0
        IGooglePlayStoreService BuildGooglePlayStoreServiceAar(IGooglePurchaseCallback googlePurchaseCallback)
        {
            var googleCachedQuerySkuDetailsService = new GoogleCachedQuerySkuDetailsService();
            var googleLastKnownProductService      = new GoogleLastKnownProductService();
            var googlePurchaseUpdatedListener      = new GooglePurchaseUpdatedListener(googleLastKnownProductService, googlePurchaseCallback, googleCachedQuerySkuDetailsService);
            var googleBillingClient          = new GoogleBillingClient(googlePurchaseUpdatedListener, util);
            var skuDetailsConverter          = new SkuDetailsConverter();
            var retryPolicy                  = new ExponentialRetryPolicy();
            var googleQuerySkuDetailsService = new QuerySkuDetailsService(googleBillingClient, googleCachedQuerySkuDetailsService, skuDetailsConverter, retryPolicy);
            var purchaseService              = new GooglePurchaseService(googleBillingClient, googlePurchaseCallback, googleQuerySkuDetailsService);
            var queryPurchasesService        = new GoogleQueryPurchasesService(googleBillingClient, googleCachedQuerySkuDetailsService);
            var finishTransactionService     = new GoogleFinishTransactionService(googleBillingClient, queryPurchasesService);
            var billingClientStateListener   = new BillingClientStateListener();
            var priceChangeService           = new GooglePriceChangeService(googleBillingClient, googleQuerySkuDetailsService);

            return(new GooglePlayStoreService(
                       googleBillingClient,
                       googleQuerySkuDetailsService,
                       purchaseService,
                       finishTransactionService,
                       queryPurchasesService,
                       billingClientStateListener,
                       priceChangeService,
                       googleLastKnownProductService
                       ));
        }