public PauseTokenCallback Register(Action callback) { _callback = new PauseTokenCallback(callback); return(_callback); }
public PauseTokenCallback Register(Action <object> callback, object state) { _callback = new PauseTokenCallback(callback, state); return(_callback); }
internal PauseToken(PauseTokenSource tokenSource) { _callback = default; _tokenSource = tokenSource; _tokenSource.PauseRequested += InvokeCallback; }