internal GooglePlayStoreExtensions(IGooglePlayStoreService googlePlayStoreService, IGooglePlayStoreFinishTransactionService googlePlayStoreFinishTransactionService, GooglePlayStoreExtensionsInternal googlePlayStoreExtensionsInternal) { m_GooglePlayStoreService = googlePlayStoreService; m_GooglePlayStoreFinishTransactionService = googlePlayStoreFinishTransactionService; m_GooglePlayStoreExtensionsInternal = googlePlayStoreExtensionsInternal; m_GooglePlayStoreExtensionsInternal.SetGooglePlayStoreExtensions(this); }
static GooglePlayStoreExtensions BuildGooglePlayStoreExtensions(IGooglePlayStoreService googlePlayStoreService, IGooglePlayStoreFinishTransactionService googlePlayStoreFinishTransactionService, IGooglePurchaseCallback googlePurchaseCallback, GooglePlayStoreExtensionsInternal googlePlayStoreExtensionsInternal) { GooglePlayStoreExtensions googlePlayStoreExtensions = new GooglePlayStoreExtensions( googlePlayStoreService, googlePlayStoreFinishTransactionService, googlePlayStoreExtensionsInternal); googlePurchaseCallback.SetStoreExtension(googlePlayStoreExtensions); return(googlePlayStoreExtensions); }
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); }