Class AsyncUrlRedirectAwaiter
Supports all classes in the .NET Framework class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all classes in the .NET Framework; it is the root of the type hierarchy.To browse the .NET Framework source code for this type, see the Reference Source.
Implements
Inherited Members
Namespace: Unity.Cloud.AppLinking
Assembly: solution.dll
Syntax
public class AsyncUrlRedirectAwaiter : IUrlRedirectAwaiter
Constructors
AsyncUrlRedirectAwaiter(int, int)
Creates an instance of AsyncUrlRedirectAwaiter.
Declaration
public AsyncUrlRedirectAwaiter(int refreshDelay = 500, int timeoutDelay = 600000)
Parameters
| Type | Name | Description |
|---|---|---|
| int | refreshDelay | The delay in milliseconds between checking for a UrlRedirectResult. |
| int | timeoutDelay | The max amount of time in milliseconds to wait for redirect before a timeout. |
AsyncUrlRedirectAwaiter(ITimeAwaiter, int, int)
Creates an instance of AsyncUrlRedirectAwaiter.
Declaration
public AsyncUrlRedirectAwaiter(ITimeAwaiter awaiter, int refreshDelay = 500, int timeoutDelay = 600000)
Parameters
| Type | Name | Description |
|---|---|---|
| ITimeAwaiter | awaiter | An implementation of ITimeAwaiter for awaiting a specific amount of time. |
| int | refreshDelay | The delay in milliseconds between checking for a UrlRedirectResult. |
| int | timeoutDelay | The max amount of time in milliseconds to wait for redirect before a timeout. |
Properties
HasResult
Whether expected result has been received.
Declaration
public bool HasResult { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HasTimedOut
Whether the total wait time has exceeded the TimeoutDelay.
Declaration
public bool HasTimedOut { get; }
Property Value
| Type | Description |
|---|---|
| bool |
RedirectResult
The awaited UrlRedirectResult.
Declaration
public UrlRedirectResult? RedirectResult { get; }
Property Value
| Type | Description |
|---|---|
| UrlRedirectResult? |
RefreshDelay
The delay in milliseconds between checking for a UrlRedirectResult.
Declaration
public 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
public int TimeoutDelay { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
BeginWait()
Initializes the wait period and clears any pre-existing results.
Declaration
public void BeginWait()
SetResult(UrlRedirectResult?)
Sets the awaited UrlRedirectResult.
Declaration
public 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
public 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 |