Google.Play.Common.PlayAsyncOperation< TResult, TError >

This is an abstract class.

Represents an asynchronous operation that produces a result upon completion.

Summary

Details
Template Parameters
TResult
The type of the result of the operation.
TError
The type of error that can be encountered during this operation.

Inheritance

Inherits from: CustomYieldInstruction

Properties

Error
TError
The error that prevented this operation from completing successfully.
IsDone
bool
Whether or not the operation has finished.
IsSuccessful
abstract bool
Whether or not the operation completed without error.
keepWaiting
override bool
Implements the CustomYieldInstruction.keepWaiting property so that this request can be yielded on in a coroutine.

Events

Completed = delegate { }
Action< PlayAsyncOperation< TResult, TError>>
Event that is invoked upon operation completion.

Public functions

GetResult()
TResult
Gets the result, if the operation is done.

Protected functions

GetResultImpl()
virtual abstract TResult
Returns the operation result.
InvokeCompletedEvent()
void
Invokes the Completed event.

Properties

Error

TErrorError

The error that prevented this operation from completing successfully.

In the case of a successful operation, this value can be ignored.

IsDone

boolIsDone

Whether or not the operation has finished.

IsSuccessful

abstractboolIsSuccessful

Whether or not the operation completed without error.

keepWaiting

overrideboolkeepWaiting

Implements the CustomYieldInstruction.keepWaiting property so that this request can be yielded on in a coroutine.

Events

Completed

Action<PlayAsyncOperation<TResult,TError>>Completed=delegate{}

Event that is invoked upon operation completion.

If an event handler is registered after the operation has completed, and thus after this event has been invoked, then the handler will be called synchronously.

Public functions

GetResult

TResultGetResult()

Gets the result, if the operation is done.

Details
Exceptions
InvalidOperationException
Throws if GetResult is called before the operation is done, or if an error occured during the operation.

Protected functions

GetResultImpl

virtualabstractTResultGetResultImpl()

Returns the operation result.

Details
Returns
The result of the operation.

InvokeCompletedEvent

voidInvokeCompletedEvent()

Invokes the Completed event.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2021年03月29日 UTC.