public void DeleteUrlMonitoringInstances(IEnumerable <UrlAddressMonitoringInstance> instances) { if (instances == null) { throw new ArgumentNullException(nameof(instances)); } _urlInstanceEditor.ExecuteDiscovery(ScomDiscoveryType.Delete, instances); foreach (var instance in instances) { _urlAddresses.Remove(_urlAddresses.First(x => x.Address == instance.Address)); } InstanceDeleted?.Invoke(this, new UrlAddressInstanceEventArgs(instances.FirstOrDefault())); }
internal static void RaiseStaticOnDeleted(IEntity record, EventArgs args) { InstanceDeleted?.Invoke(record, args); }