TryGetValue<T>(IPromise<T>, out T)
Attempts to get the value of a promise if it is resolved.
Declaration
public static bool TryGetValue<T>(this IPromise<T> promise, out T value)Parameters
| Type | Name | Description |
|---|---|---|
| IPromise<T> | promise | The promise to get the value from. |
| T | value | When this method returns, contains the value if the promise is resolved; otherwise, the default value for type |
Returns
| Type | Description |
|---|---|
| bool | true if the promise is resolved and the value was retrieved; otherwise, false. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of value contained in the promise. |