using System; using System.Collections; namespace Unity.Services.Core.Internal { /// /// Contract for an asynchronous operation with no result. /// interface IAsyncOperation : IEnumerator { /// /// If true, this operation either succeeded, failed, or has been canceled. /// bool IsDone { get; } /// /// The current status of this operation. /// AsyncOperationStatus Status { get; } /// /// Event raised when the operation succeeded or failed. /// The argument is the operation that raised the event. /// event Action Completed; /// /// The exception that occured during the operation if it failed. /// Exception Exception { get; } } /// /// Contract for an asynchronous operation returning a result. /// /// /// The result's type of this operation. /// interface IAsyncOperation : IEnumerator { /// bool IsDone { get; } /// AsyncOperationStatus Status { get; } /// /// Event raised when the operation succeeded or failed. /// The argument is the operation that raised the event. /// event Action> Completed; /// Exception Exception { get; } /// /// The result of this operation. /// T Result { get; } } }