Inheritance: Xilium.CefGlue.CefTask
Ejemplo n.º 1
0
        public static Task DispatchAsync(this CefTaskRunner @this, Action actionToRun)
        {
            var actiontask = new CefTask_Action(actionToRun);

            @this.PostTask(actiontask);
            return(actiontask.Task);
        }
Ejemplo n.º 2
0
        public static Task RunAsync(this CefTaskRunner @this, Action actionToRun)
        {
            if (@this.BelongsToCurrentThread)
            {
                actionToRun();
                return(TaskHelper.Ended());
            }

            var actiontask = new CefTask_Action(actionToRun);

            @this.PostTask(actiontask);
            return(actiontask.Task);
        }
        public static Task RunAsync(this CefTaskRunner @this, Action actionToRun)
        {
            if (@this.BelongsToCurrentThread)
            {
                actionToRun();
                return(Task.FromResult <object>(null));
            }

            var actiontask = new CefTask_Action(actionToRun);

            @this.PostTask(actiontask);
            return(actiontask.Task);
        }