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