示例#1
0
        /// <summary>
        /// Created for integration testing.
        /// </summary>
        internal static void Initialize(IStoreListener listener, ConfigurationBuilder builder,
                                        ILogger logger, string persistentDatapath, IUnityAnalytics analytics, ICatalogProvider catalog)
        {
            var transactionLog    = new TransactionLog(logger, persistentDatapath);
            var manager           = new PurchasingManager(transactionLog, logger, builder.factory.service, builder.factory.storeName);
            var analyticsReporter = new AnalyticsReporter(analytics);

            // Proxy the PurchasingManager's callback interface to forward Transactions to Analytics.
            var proxy = new StoreListenerProxy(listener, analyticsReporter, builder.factory);

            FetchAndMergeProducts(builder.useCatalogProvider, builder.products, catalog, response =>
            {
                manager.Initialize(proxy, response);
            });
        }
示例#2
0
 public StoreListenerProxy(IStoreListener forwardTo, AnalyticsReporter analytics, IExtensionProvider extensions)
 {
     this.m_ForwardTo  = forwardTo;
     this.m_Analytics  = analytics;
     this.m_Extensions = extensions;
 }
 public StoreListenerProxy(IStoreListener forwardTo, AnalyticsReporter analytics, IExtensionProvider extensions)
 {
     this.m_ForwardTo = forwardTo;
     this.m_Analytics = analytics;
     this.m_Extensions = extensions;
 }