예제 #1
0
        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);
        }
예제 #2
0
        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);
        }