/// <summary>
 /// Schedules the continuation action for the task associated with this awaiter.
 /// </summary>
 /// <param name="continuation">
 /// The action to invoke when the await operation completes.
 /// </param>
 public void OnCompleted(Action continuation)
 {
     if (CefNetApi.Post(_threadId, continuation))
     {
         return;
     }
     throw new InvalidOperationException();
 }
Пример #2
0
 /// <summary>
 /// Quit the CEF message loop that was started by calling <see cref="Run"/>.
 /// </summary>
 /// <remarks>
 /// This function should only be called if <see cref="Run"/> was used.
 /// </remarks>
 public static void Exit()
 {
     if (CefApi.CurrentlyOn(CefThreadId.UI))
     {
         CefApi.QuitMessageLoop();
     }
     else
     {
         CefNetApi.Post(CefThreadId.UI, CefApi.QuitMessageLoop);
     }
 }