UI Tookit UI Tookit
UI Tookit UI Tookit
DocFX + Singulink = ♥

Search Results for

    Method SendAsync

    SendAsync(Action)

    Synchronously executes the specified action if the current thread is the UI thread, otherwise asynchronously posts it to the UI thread for execution and returns a task that completes when execution finishes. Tracked as a non-busy task.

    Declaration
    public ValueTask SendAsync(Action action)
    Parameters
    Type Name Description
    Action action
    Returns
    Type Description
    ValueTask
    Implements
    ITaskRunner.SendAsync(Action)

    SendAsync<T>(T, Action<T>)

    Synchronously executes the specified action if the current thread is the UI thread, otherwise asynchronously posts it to the UI thread for execution and returns a task that completes when execution finishes. Tracked as a non-busy task.

    Declaration
    public ValueTask SendAsync<T>(T state, Action<T> action)
    Parameters
    Type Name Description
    T state
    Action<T> action
    Returns
    Type Description
    ValueTask
    Type Parameters
    Name Description
    T
    Implements
    ITaskRunner.SendAsync<T>(T, Action<T>)

    SendAsync<TResult>(Func<TResult>)

    Synchronously executes the specified function if the current thread is the UI thread, otherwise asynchronously posts it to the UI thread for execution and returns a task that contains the result when execution finishes. Tracked as a non-busy task.

    Declaration
    public ValueTask<TResult> SendAsync<TResult>(Func<TResult> func)
    Parameters
    Type Name Description
    Func<TResult> func
    Returns
    Type Description
    ValueTask<TResult>
    Type Parameters
    Name Description
    TResult
    Implements
    ITaskRunner.SendAsync<TResult>(Func<TResult>)

    SendAsync<T, TResult>(T, Func<T, TResult>)

    Synchronously executes the specified function using the provided state if the current thread is the UI thread, otherwise asynchronously posts them to the UI thread for execution and returns a task that contains the result of the function when execution finishes. Tracked as a non-busy task.

    Declaration
    public ValueTask<TResult> SendAsync<T, TResult>(T state, Func<T, TResult> func)
    Parameters
    Type Name Description
    T state
    Func<T, TResult> func
    Returns
    Type Description
    ValueTask<TResult>
    Type Parameters
    Name Description
    T
    TResult
    Implements
    ITaskRunner.SendAsync<T, TResult>(T, Func<T, TResult>)

    SendAsync(Func<Task>)

    Synchronously executes the specified function if the current thread is the UI thread, otherwise asynchronously posts it to the UI thread for execution, and then returns a task that completes when the execution of the task returned by the function completes. Tracked as a non-busy task.

    Declaration
    public Task SendAsync(Func<Task> taskFunc)
    Parameters
    Type Name Description
    Func<Task> taskFunc
    Returns
    Type Description
    Task
    Implements
    ITaskRunner.SendAsync(Func<Task>)

    SendAsync<TResult>(Func<Task<TResult>>)

    Synchronously executes the specified function if the current thread is the UI thread, otherwise asynchronously posts it to the UI thread for execution, and then returns a task that contains the result of the task returned by the function when it completes. Tracked as a non-busy task.

    Declaration
    public Task<TResult> SendAsync<TResult>(Func<Task<TResult>> taskFunc)
    Parameters
    Type Name Description
    Func<Task<TResult>> taskFunc
    Returns
    Type Description
    Task<TResult>
    Type Parameters
    Name Description
    TResult
    Implements
    ITaskRunner.SendAsync<TResult>(Func<Task<TResult>>)
    © Singulink. All rights reserved.