static GooglePlayConfiguration BuildGooglePlayStoreConfiguration(IGooglePlayStoreService googlePlayStoreService, IGooglePurchaseCallback googlePurchaseCallback)
        {
            GooglePlayConfiguration googlePlayConfiguration = new GooglePlayConfiguration(googlePlayStoreService);

            googlePurchaseCallback.SetStoreConfiguration(googlePlayConfiguration);
            return(googlePlayConfiguration);
        }
        private IStore InstantiateGoogleStore()
        {
            IGooglePurchaseCallback googlePurchaseCallback = new GooglePlayPurchaseCallback();

            var googlePlayStoreService = BuildGooglePlayStoreServiceAar(googlePurchaseCallback);

            var googlePlayStoreExtensionsInternal = new GooglePlayStoreExtensionsInternal();
            var googlePlayConfigurationInternal   = new GooglePlayConfigurationInternal();

            IGooglePlayStorePurchaseService          googlePlayStorePurchaseService          = new GooglePlayStorePurchaseService(googlePlayStoreService);
            IGooglePlayStoreFinishTransactionService googlePlayStoreFinishTransactionService = new GooglePlayStoreFinishTransactionService(googlePlayStoreService);
            IGoogleFetchPurchases googleFetchPurchases = new GoogleFetchPurchases(googlePlayStoreService, googlePlayStoreFinishTransactionService);
            IGooglePlayStoreRetrieveProductsService googlePlayStoreRetrieveProductsService = new GooglePlayStoreRetrieveProductsService(
                googlePlayStoreService,
                googleFetchPurchases,
                googlePlayConfigurationInternal);
            var googlePlayStoreExtensions = BuildGooglePlayStoreExtensions(
                googlePlayStoreService,
                googlePlayStoreFinishTransactionService,
                googlePurchaseCallback,
                googlePlayStoreExtensionsInternal);
            var googlePlayConfiguration = new GooglePlayConfiguration();

            googlePlayConfiguration.SetGooglePlayConfigurationInternal(googlePlayConfigurationInternal);

            GooglePlayStore googlePlayStore = new GooglePlayStore(
                googlePlayStoreRetrieveProductsService,
                googlePlayStorePurchaseService,
                googleFetchPurchases,
                googlePlayStoreFinishTransactionService,
                googlePurchaseCallback,
                googlePlayStoreExtensions,
                util
                );

            util.AddPauseListener(googlePlayStore.OnPause);
            BindGoogleConfiguration(googlePlayConfiguration);
            BindGoogleExtension(googlePlayStoreExtensions);
            return(googlePlayStore);
        }
 void BindGoogleConfiguration(GooglePlayConfiguration googlePlayConfiguration)
 {
     BindConfiguration <IGooglePlayConfiguration>(googlePlayConfiguration);
 }
Example #4
0
 public void SetGooglePlayConfiguration(GooglePlayConfiguration googlePlayConfiguration)
 {
     m_GooglePlayConfiguration = googlePlayConfiguration;
 }