public CommandPacket() { OneTimeTimer.Run(() => { debugInfo = this.ToJsonText(); }, 100); }
public static void DelayRaise(this INotifyPropertyChanged obj, string propertyName, int milliseconds, Func <PropertyChangedEventHandler> funcGetHandler) { var timer = new OneTimeTimer(milliseconds); timer.Start(() => { var propertyChangedDelegate = funcGetHandler(); if (propertyChangedDelegate != null) { propertyChangedDelegate(obj, new PropertyChangedEventArgs(propertyName)); } }); }
public static void Run(Action action, int timeSpan) { var timer = new OneTimeTimer(timeSpan); timer.Start(action); }