Interface IUrlRedirectAwaiter
Configures the refresh rate and timeout delay for awaiting a UrlRedirectResult.
Namespace: Unity.Cloud.AppLinking
Assembly: solution.dll
Syntax
public interface IUrlRedirectAwaiter
Properties
HasResult
Whether expected result has been received.
Declaration
bool HasResult { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HasTimedOut
Whether the total wait time has exceeded the TimeoutDelay.
Declaration
bool HasTimedOut { get; }
Property Value
| Type | Description |
|---|---|
| bool |
RedirectResult
The awaited UrlRedirectResult.
Declaration
UrlRedirectResult? RedirectResult { get; }
Property Value
| Type | Description |
|---|---|
| UrlRedirectResult? |
RefreshDelay
The delay in milliseconds between checking for a UrlRedirectResult.
Declaration
int RefreshDelay { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
TimeoutDelay
The max amount of time in milliseconds to wait for redirect before a timeout.
Declaration
int TimeoutDelay { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
BeginWait()
Initializes the wait period and clears any pre-existing results.
Declaration
void BeginWait()
SetResult(UrlRedirectResult?)
Sets the awaited UrlRedirectResult.
Declaration
void SetResult(UrlRedirectResult? result)
Parameters
| Type | Name | Description |
|---|---|---|
| UrlRedirectResult? | result | The result of the redirect operation. |
WaitForRefreshAsync(CancellationToken)
Waits for the specific RefreshDelay period.
Declaration
Task WaitForRefreshAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The cancellation token for the operation. |
Returns
| Type | Description |
|---|---|
| Task | A Task that completes when the UrlRedirectResult has been received or the timeout period has elapsed. |
Exceptions
| Type | Condition |
|---|---|
| TaskCanceledException | Thrown if the task is cancelled |