public ClockAdapter(Clock clock) { _clock = clock ?? throw new ArgumentNullException(nameof(clock)); if (_clock.Parent != null) { _parent = new ClockAdapter(_clock.Parent); } if (clock.Controller != null) { _clockController = new ClockControllerAdapter(this, _clock.Controller); } _clock.Completed += (sender, e) => Completed?.Invoke(sender, e); _clock.RemoveRequested += (sender, e) => RemoveRequested?.Invoke(sender, e); _clock.CurrentTimeInvalidated += (sender, e) => CurrentTimeInvalidated?.Invoke(sender, e); _clock.CurrentStateInvalidated += (sender, e) => CurrentStateInvalidated?.Invoke(sender, e); _clock.CurrentGlobalSpeedInvalidated += (sender, e) => CurrentGlobalSpeedInvalidated?.Invoke(sender, e); }
public void RaiseCurrentTimeInvalidated() { CurrentTimeInvalidated?.Invoke(this, EventArgs.Empty); }