public static void Unregister(Service service) { if (!IsRegistered(service)) { throw new ServiceSchedulerException("Service " + service.Information.ServiceName + " is not registered!"); } lock (ServicesBindings) ServicesBindings.Remove(ServicesBindings.FirstOrDefault(s => s.Service == service)); ServiceEvents.RaiseServiceUnRegistered(service); }
public static void Unregister(Service service) { if (!IsRegistered(service)) { throw new ServiceSchedulerException("Service " + service.Information.ServiceName + " is not registered!"); } lock (ServicesBindings) ServicesBindings.Remove(ServicesBindings.FirstOrDefault(s => s.Service == service)); ServiceEvents.RaiseServiceUnRegistered(service); SettingsChangedManager.SetNeedsContactSync(service, true); Analytics.RaiseServiceEvent( Analytics.EventAction.ServiceUnregistered, Analytics.EventCategory.Services, service); }