// Token: 0x060075FA RID: 30202 RVA: 0x00184597 File Offset: 0x00182797 public NotificationWrapper(WorkloadClassification classification, HealthRecoveryNotification delegateToFire) { this.Classification = classification; this.Notification = delegateToFire; this.Key = Guid.NewGuid(); }
// Token: 0x060075E8 RID: 30184 RVA: 0x00183D14 File Offset: 0x00181F14 public Guid SubscribeToHealthNotifications(WorkloadClassification classification, HealthRecoveryNotification delegateToFire) { if (delegateToFire == null) { throw new ArgumentNullException("delegateToFire"); } if (classification == WorkloadClassification.Unknown) { throw new ArgumentException("You cannot use Unknown to register for health change notifications.", "classification"); } ExTraceGlobals.ResourceHealthManagerTracer.TraceDebug <ResourceKey, WorkloadClassification>((long)this.GetHashCode(), "[CacheableResourceHealthMonitor.SubscribeToHealthNotifications] Registration was made for resource '{0}', classification: {1}.", this.Key, classification); Guid key; lock (this.instanceLock) { CacheableResourceHealthMonitor.NotificationWrapper notificationWrapper = new CacheableResourceHealthMonitor.NotificationWrapper(classification, delegateToFire); this.notifications.Add(notificationWrapper); this.notificationCount++; key = notificationWrapper.Key; } return(key); }