示例#1
0
        public async Task <bool> HandlePause()
        {
            var ret = false;

            while (IsPaused != null && IsPaused.Invoke())
            {
                ret = true;
                await Task.Yield();
            }
            return(ret);
        }
示例#2
0
 protected virtual void OnIsPaused(EventArgs e)
 {
     IsPaused?.Invoke(this, isPaused);
 }