public void Unregister(IMonitorClient client) { LiveFeedStarted -= client.Monitor_LiveFeedStarted; LiveFeedUpdated -= client.Monitor_LiveFeedUpdated; ServiceStateChanged -= client.Monitor_ServiceStateChanged; ServiceActivity -= client.Monitor_ServiceActivity; }
private MonitorManager(RestClient restClient, string subscriptionId) : base(restClient, subscriptionId, GetInnerClient(restClient, subscriptionId)) { InnerEx = new MonitorClient(new Uri(restClient.BaseUri), restClient.Credentials, restClient.RootHttpHandler, restClient.Handlers.ToArray()) { SubscriptionId = subscriptionId }; }
/// <summary> /// Dispose the resources /// </summary> /// <param name="disposing">Indicates whether the managed resources should be disposed or not</param> protected override void Dispose(bool disposing) { if (!this.disposed) { if (this.MonitorClient != null) { this.MonitorClient.Dispose(); this.MonitorClient = null; } this.disposed = true; } base.Dispose(disposing); }
public MonitorService(ILogger <MonitorService> logger, IMonitorClient client) { _logger = logger; _Client = client; }