Class UrlRedirectionInterceptor
This IUrlRedirectionInterceptor implementation handles url redirection interception and validation of awaited query arguments.
Inherited Members
Namespace: Unity.Cloud.Common.Runtime
Syntax
public class UrlRedirectionInterceptor : IUrlRedirectionInterceptor, IDisposable
Properties
AwaitedQueryArguments
The list of query arguments to validate when receiving the awaited callback url.
Declaration
public List<string> AwaitedQueryArguments { get; }
Property Value
Type | Description |
---|---|
List<String> |
Implements
Methods
AwaitRedirectAsync(List<String>)
Returns a Task awaiting a UrlRedirectResult.
Declaration
public async Task<UrlRedirectResult> AwaitRedirectAsync(List<string> awaitedQueryArguments = null)
Parameters
Type | Name | Description |
---|---|---|
List<String> | awaitedQueryArguments | The list of query arguments to validate when receiving the awaited callback url. |
Returns
Type | Description |
---|---|
Task<UrlRedirectResult> | A Task that results in a UrlRedirectResult when completed. |
Implements
Exceptions
Type | Condition |
---|---|
TimeoutException | Thrown if no redirect occured within the allotted time limit. |
Dispose()
Performs tasks related to disposing of associated resources.
Declaration
public void Dispose()
Implements
Dispose(Boolean)
Performs tasks related to disposing of associated resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | Whether we want to . |
GetInstance()
Gets or creates the static instance of IUrlRedirectionInterceptor.
Declaration
public static IUrlRedirectionInterceptor GetInstance()
Returns
Type | Description |
---|---|
IUrlRedirectionInterceptor | The static instance of IUrlRedirectionInterceptor. |
GetRedirectionResult()
Gets a nullable UrlRedirectResult value.
Declaration
public UrlRedirectResult? GetRedirectionResult()
Returns
Type | Description |
---|---|
Nullable<UrlRedirectResult> | A nullable UrlRedirectResult value. |
Implements
GetRedirectProcessId()
Gets a string representation of the current process id or main window id.
Declaration
public string GetRedirectProcessId()
Returns
Type | Description |
---|---|
String | A string representation of the current process id or main window id. |
Implements
Remarks
Only used for windows applications.
InterceptAwaitedUrl(String, List<String>)
Call this method with any incoming activation url and a list of awaited query arguments required for interception.
Declaration
public void InterceptAwaitedUrl(string url, List<string> awaitedQueryArguments = null)
Parameters
Type | Name | Description |
---|---|---|
String | url | The url received. |
List<String> | awaitedQueryArguments | The list of query arguments required to validate url. |
Implements
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
Events
DeepLinkForwarded
Triggered when an intercepted uri can be forwarded to a deep link processor.
Declaration
public event Action<Uri> DeepLinkForwarded
Event Type
Type | Description |
---|---|
Action<Uri> |