internal void Bind(PluginData p, Func <string, LiveServiceInfo> serviceFinder, DelayedPropertyNotification notifier) { Debug.Assert(_pluginInfo == p.PluginInfo); var newService = p.Service != null?serviceFinder(p.Service.ServiceInfo.ServiceFullName) : null; notifier.Update(this, ref _service, newService, () => Service); }
internal void Bind(ServiceData s, Func <string, LiveServiceInfo> serviceFinder, Func <string, LivePluginInfo> pluginFinder, DelayedPropertyNotification notifier) { var newGeneralization = s.Generalization != null?serviceFinder(s.Generalization.ServiceInfo.ServiceFullName) : null; notifier.Update(this, ref _generalization, newGeneralization, () => Generalization); var familyRunning = s.Family.DynRunningPlugin; Debug.Assert(IsRunning == (familyRunning != null && s.IsGeneralizationOf(familyRunning.Service))); ILivePluginInfo newRunningPlugin = null; if (IsRunning) { newRunningPlugin = pluginFinder(familyRunning.PluginInfo.PluginFullName); } if (_runningPlugin != null) { notifier.Update(this, ref _lastRunningPlugin, _runningPlugin, () => LastRunningPlugin); } notifier.Update(this, ref _runningPlugin, newRunningPlugin, () => RunningPlugin); }
internal void UpdateFrom(SolvedConfigurationStatus finalConfigStatus, FinalConfigStartableStatus s, DelayedPropertyNotification notifier) { AllFlags newOne = new AllFlags(finalConfigStatus, s); notifier.Update(this, ref _flags.CanStop, newOne.CanStop, () => CanStop); notifier.Update(this, ref _flags.CanStart, newOne.CanStart, () => CanStart); notifier.Update(this, ref _flags.CanStartWithFullStart, newOne.CanStartWithFullStart, () => CanStartWithFullStart); notifier.Update(this, ref _flags.CanStartWithStartRecommended, newOne.CanStartWithStartRecommended, () => CanStartWithStartRecommended); notifier.Update(this, ref _flags.CanStartWithStopOptionalAndRunnable, newOne.CanStartWithStopOptionalAndRunnable, () => CanStartWithStopOptionalAndRunnable); notifier.Update(this, ref _flags.CanStartWithFullStop, newOne.CanStartWithFullStop, () => CanStartWithFullStop); }
protected void UpdateItem(IYodiiItemData d, DelayedPropertyNotification notifier) { Debug.Assert(d.DynamicStatus != null); bool wasRunning = _runningStatus >= RunningStatus.Running; var prevFinalSolvedConfig = FinalConfigSolvedStatus; _capability.UpdateFrom(d.FinalConfigSolvedStatus, d.FinalStartableStatus, notifier); notifier.Update(this, ref _disabledReason, d.DisabledReason, () => DisabledReason); notifier.Update(this, ref _runningStatus, d.DynamicStatus.Value, () => RunningStatus); notifier.Update(this, ref _configOriginalStatus, d.ConfigOriginalStatus, () => ConfigOriginalStatus); notifier.Update(this, ref _configSolvedStatus, d.ConfigSolvedStatus, () => WantedConfigSolvedStatus); notifier.Update(this, ref _configOriginalImpact, d.ConfigOriginalImpact, () => ConfigOriginalImpact); notifier.Update(this, ref _configSolvedImpact, d.RawConfigSolvedImpact, () => ConfigSolvedImpact); if (wasRunning != (_runningStatus >= RunningStatus.Running)) { notifier.Notify(this, () => IsRunning); } if (prevFinalSolvedConfig != FinalConfigSolvedStatus) { notifier.Notify(this, () => FinalConfigSolvedStatus); } }
internal void UpdateFrom(PluginData p, DelayedPropertyNotification notifier) { Debug.Assert(FullName == p.PluginInfo.PluginFullName); UpdateItem(p, notifier); notifier.Update(this, ref _pluginInfo, p.PluginInfo, () => PluginInfo); }
internal void UpdateFrom(ServiceData s, DelayedPropertyNotification notifier) { UpdateItem(s, notifier); notifier.Update(this, ref _serviceInfo, s.ServiceInfo, () => ServiceInfo); }