docs.unity3d.com
    Show / Hide Table of Contents

    Class AsyncOp

    Asynchronous operation base class

    Inheritance
    Object
    AsyncOp
    AsyncAction
    AsyncAction<T>
    AsyncRequest<T>
    Namespace: Unity.PSN.PS5.Aysnc
    Syntax
    public class AsyncOp

    Properties

    AysncState

    Return the async state

    Declaration
    public AsyncOp.State AysncState { get; }
    Property Value
    Type Description
    AsyncOp.State

    ExecuteDurationMs

    How long did the operation run for

    Declaration
    public long ExecuteDurationMs { get; }
    Property Value
    Type Description
    Int64

    HasSequenceFailed

    Has the sequence failed

    Declaration
    public bool HasSequenceFailed { get; }
    Property Value
    Type Description
    Boolean

    IsCompleted

    Has the operation completed. This only refers to this operation and not the full sequence of operations.

    Declaration
    public bool IsCompleted { get; }
    Property Value
    Type Description
    Boolean

    IsCompletedSuccessfully

    Has the root operation completed sucessfully along with the full sequence of operations.

    Declaration
    public bool IsCompletedSuccessfully { get; }
    Property Value
    Type Description
    Boolean

    IsSequenceCompleted

    Has the sequence completed. This is only set on a Root operation when all operations in the sequence have completed

    Declaration
    public bool IsSequenceCompleted { get; }
    Property Value
    Type Description
    Boolean

    Last

    Get the last operation in a sequence.

    Declaration
    public AsyncOp Last { get; }
    Property Value
    Type Description
    AsyncOp

    Root

    Get the root operation in a sequence.

    Declaration
    public AsyncOp Root { get; }
    Property Value
    Type Description
    AsyncOp

    WaitDurationMs

    How long was the operation waiting in the queue before running

    Declaration
    public long WaitDurationMs { get; }
    Property Value
    Type Description
    Int64

    Methods

    ContinueWith(Action)

    Join an Action onto this operation, which will execute after this operation has finished.

    Declaration
    public AsyncAction ContinueWith(Action continueWith)
    Parameters
    Type Name Description
    Action continueWith

    The Action to run

    Returns
    Type Description
    AsyncAction

    An operation which will execute the action

    ContinueWith(Action<AsyncOp>)

    Join an Action, which contains an operation, onto this operation, which will execute after this operation has finished.

    Declaration
    public AsyncAction<AsyncOp> ContinueWith(Action<AsyncOp> continueWith)
    Parameters
    Type Name Description
    Action<AsyncOp> continueWith

    The action to run

    Returns
    Type Description
    AsyncAction<AsyncOp>

    An async action containing the operation

    ContinueWith(AsyncOp)

    Join another operation onto this one, which will execute after this operation has finished.

    Declaration
    public void ContinueWith(AsyncOp continueWith)
    Parameters
    Type Name Description
    AsyncOp continueWith

    The next operation

    ContinueWith<T>(AsyncRequest<T>)

    Join an Request operation onto this operation, which will execute after this operation has finished.

    Declaration
    public AsyncRequest<T> ContinueWith<T>(AsyncRequest<T> continueWith)
        where T : Request
    Parameters
    Type Name Description
    AsyncRequest<T> continueWith

    The request async operation

    Returns
    Type Description
    AsyncRequest<T>

    An async request operation

    Type Parameters
    Name Description
    T

    A type of Request. Request

    Reset()

    Reset the state of the operation so it can be scheduled again

    Declaration
    public void Reset()
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 25 September 2020