Class WebAppUrlComposer
A class that provides utilities for web app resources.
Implements
Inherited Members
Namespace: Unity.Cloud.AppLinking
Assembly: Unity.Cloud.AppLinking.dll
Syntax
public class WebAppUrlComposer : IWebAppUrlComposer
Constructors
WebAppUrlComposer(IServiceHostResolver, IHttpClient)
Builds the WebAppUrlComposer.
Declaration
public WebAppUrlComposer(IServiceHostResolver serviceHostResolver, IHttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
IServiceHostResolver | serviceHostResolver | The service host resolver |
IHttpClient | httpClient | The http client |
Methods
ComposeUrlAsync(string, string)
An awaitable task that returns an absolute URL to a web app resource.
Declaration
public Task<string> ComposeUrlAsync(string webAppName, string pathAndQuery = null)
Parameters
Type | Name | Description |
---|---|---|
string | webAppName | The web app name. |
string | pathAndQuery | The optional path and query to append. |
Returns
Type | Description |
---|---|
Task<string> | A task that returns an absolute URL to a web app resource. |
Exceptions
Type | Condition |
---|---|
InvalidArgumentException | Thrown when the web app name is not supported on the server. |
IsWebAppSupportedAsync(string)
An awaitable task that returns if a web app name is supported on the server.
Declaration
public Task<bool> IsWebAppSupportedAsync(string webAppName)
Parameters
Type | Name | Description |
---|---|---|
string | webAppName | The web app name. |
Returns
Type | Description |
---|---|
Task<bool> | A task that returns if a web app name is supported on the server. |