Search Results for

    Show / Hide Table of Contents

    Class PipeToSupport

    Creates the PipeTo pattern for automatically sending the results of completed tasks into the inbox of a designated Actor

    Inheritance
    object
    PipeToSupport
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Actor
    Assembly: Akka.dll
    Syntax
    public static class PipeToSupport

    Methods

    | Edit this page View Source

    PipeTo(Task, ICanTell, IActorRef, Func<object>, Func<Exception, object>)

    Pipes the output of a Task directly to the recipient's mailbox once the task completes. As this task has no result, only exceptions will be piped to the recipient

    Declaration
    public static Task PipeTo(this Task taskToPipe, ICanTell recipient, IActorRef sender = null, Func<object> success = null, Func<Exception, object> failure = null)
    Parameters
    Type Name Description
    Task taskToPipe

    The Task that result needs to be piped to an actor

    ICanTell recipient

    The actor that will receive the Task result

    IActorRef sender

    The IActorRef that will be used as the sender of the result. Defaults to Nobody

    Func<object> success

    A callback function that will be called on Task success. Defaults to null for no callback

    Func<Exception, object> failure

    A callback function that will be called on Task failure. Defaults to null for no callback

    Returns
    Type Description
    Task

    A detached task

    | Edit this page View Source

    PipeTo(Task, ICanTell, bool, IActorRef, Func<object>, Func<Exception, object>)

    Pipes the output of a Task directly to the recipient's mailbox once the task completes. As this task has no result, only exceptions will be piped to the recipient

    Declaration
    public static Task PipeTo(this Task taskToPipe, ICanTell recipient, bool useConfigureAwait, IActorRef sender = null, Func<object> success = null, Func<Exception, object> failure = null)
    Parameters
    Type Name Description
    Task taskToPipe

    The Task that result needs to be piped to an actor

    ICanTell recipient

    The actor that will receive the Task result

    bool useConfigureAwait

    Sets the taskToPipe.ConfigureAwait(bool) bool parameter

    IActorRef sender

    The IActorRef that will be used as the sender of the result. Defaults to Nobody

    Func<object> success

    A callback function that will be called on Task success. Defaults to null for no callback

    Func<Exception, object> failure

    A callback function that will be called on Task failure. Defaults to null for no callback

    Returns
    Type Description
    Task

    A detached task

    | Edit this page View Source

    PipeTo(ValueTask, ICanTell, IActorRef, Func<object>, Func<Exception, object>)

    Declaration
    public static Task PipeTo(this ValueTask taskToPipe, ICanTell recipient, IActorRef sender = null, Func<object> success = null, Func<Exception, object> failure = null)
    Parameters
    Type Name Description
    ValueTask taskToPipe
    ICanTell recipient
    IActorRef sender
    Func<object> success
    Func<Exception, object> failure
    Returns
    Type Description
    Task
    | Edit this page View Source

    PipeTo(ValueTask, ICanTell, bool, IActorRef, Func<object>, Func<Exception, object>)

    Declaration
    public static Task PipeTo(this ValueTask taskToPipe, ICanTell recipient, bool useConfigureAwait, IActorRef sender = null, Func<object> success = null, Func<Exception, object> failure = null)
    Parameters
    Type Name Description
    ValueTask taskToPipe
    ICanTell recipient
    bool useConfigureAwait
    IActorRef sender
    Func<object> success
    Func<Exception, object> failure
    Returns
    Type Description
    Task
    | Edit this page View Source

    PipeTo<T>(Task<T>, ICanTell, IActorRef, Func<T, object>, Func<Exception, object>)

    Pipes the output of a Task directly to the recipient's mailbox once the task completes

    Declaration
    public static Task PipeTo<T>(this Task<T> taskToPipe, ICanTell recipient, IActorRef sender = null, Func<T, object> success = null, Func<Exception, object> failure = null)
    Parameters
    Type Name Description
    Task<T> taskToPipe

    The Task that result needs to be piped to an actor

    ICanTell recipient

    The actor that will receive the Task result

    IActorRef sender

    The IActorRef that will be used as the sender of the result. Defaults to Nobody

    Func<T, object> success

    A callback function that will be called on Task success. Defaults to null for no callback

    Func<Exception, object> failure

    A callback function that will be called on Task failure. Defaults to null for no callback

    Returns
    Type Description
    Task

    A detached task

    Type Parameters
    Name Description
    T

    The type of result of the Task

    | Edit this page View Source

    PipeTo<T>(Task<T>, ICanTell, bool, IActorRef, Func<T, object>, Func<Exception, object>)

    Pipes the output of a Task directly to the recipient's mailbox once the task completes

    Declaration
    public static Task PipeTo<T>(this Task<T> taskToPipe, ICanTell recipient, bool useConfigureAwait, IActorRef sender = null, Func<T, object> success = null, Func<Exception, object> failure = null)
    Parameters
    Type Name Description
    Task<T> taskToPipe

    The Task that result needs to be piped to an actor

    ICanTell recipient

    The actor that will receive the Task result

    bool useConfigureAwait

    Sets the taskToPipe.ConfigureAwait(bool) bool parameter

    IActorRef sender

    The IActorRef that will be used as the sender of the result. Defaults to Nobody

    Func<T, object> success

    A callback function that will be called on Task success. Defaults to null for no callback

    Func<Exception, object> failure

    A callback function that will be called on Task failure. Defaults to null for no callback

    Returns
    Type Description
    Task

    A detached task

    Type Parameters
    Name Description
    T

    The type of result of the Task

    | Edit this page View Source

    PipeTo<T>(ValueTask<T>, ICanTell, IActorRef, Func<T, object>, Func<Exception, object>)

    Declaration
    public static Task PipeTo<T>(this ValueTask<T> taskToPipe, ICanTell recipient, IActorRef sender = null, Func<T, object> success = null, Func<Exception, object> failure = null)
    Parameters
    Type Name Description
    ValueTask<T> taskToPipe
    ICanTell recipient
    IActorRef sender
    Func<T, object> success
    Func<Exception, object> failure
    Returns
    Type Description
    Task
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    PipeTo<T>(ValueTask<T>, ICanTell, bool, IActorRef, Func<T, object>, Func<Exception, object>)

    Declaration
    public static Task PipeTo<T>(this ValueTask<T> taskToPipe, ICanTell recipient, bool useConfigureAwait, IActorRef sender = null, Func<T, object> success = null, Func<Exception, object> failure = null)
    Parameters
    Type Name Description
    ValueTask<T> taskToPipe
    ICanTell recipient
    bool useConfigureAwait
    IActorRef sender
    Func<T, object> success
    Func<Exception, object> failure
    Returns
    Type Description
    Task
    Type Parameters
    Name Description
    T
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET