// Token: 0x060013C5 RID: 5061 RVA: 0x000733CC File Offset: 0x000715CC public void ReturnReference() { lock (this.syncroot) { if (this.referenceCounter > 0) { this.referenceCounter--; } if (this.referenceCounter == 0) { if (this.BatchManager != null) { this.BatchManager.Dispose(); this.BatchManager = null; this.PublisherClient.Dispose(); this.PublisherClient = null; } if (this.ProxyWatcher != null) { this.ProxyWatcher.Dispose(); this.ProxyWatcher = null; } } } }
// Token: 0x060013C4 RID: 5060 RVA: 0x00073304 File Offset: 0x00071504 public PushNotificationBatchManager TakeReference() { PushNotificationBatchManager batchManager; lock (this.syncroot) { this.referenceCounter++; if (this.BatchManager == null) { this.PublisherClient = new PublisherServiceProxy(null); this.BatchManager = new PushNotificationBatchManager(this.BatchConfig, this.PublisherClient); } if (this.ProxyWatcher == null && !this.AssistantConfig.IsAssistantPublishingEnabled) { this.ProxyWatcher = new PushNotificationProxyConfigWatcher(this.AssistantConfig); this.ProxyWatcher.Start(); } if (this.referenceCounter == 1) { PushNotificationHelper.LogAssistantPublishingStatus(this.AssistantConfig.IsPublishingEnabled); } batchManager = this.BatchManager; } return(batchManager); }