Interface IApplicationEnvironment
Represents the environment that a device can interact with applications.
Inherited Members
Namespace: Microsoft.XboxStudios.DeviceConsole.Environments.Applications
Assembly: DeviceConsole.Environments.dll
Syntax
public interface IApplicationEnvironment : IDeviceEnvironment, IDeviceContainer, IHasConnectionStatus
Methods
View SourceIsRunningAsync(string, TimeSpan?)
Checks if a specific application is running.
Declaration
Task<bool> IsRunningAsync(string packageName, TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
string | packageName | The package name to check if it is running. |
TimeSpan? | timeout | The timeout for the operation. |
Returns
Type | Description |
---|---|
Task<bool> | True, if the application is running, false otherwise. |
IsRunningAsync(string, string?, CancellationToken)
Checks if a specific package/application is running.
Declaration
Task<bool> IsRunningAsync(string packageName, string? applicationId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | packageName | The package name to check if it is running. |
string | applicationId | The application to check, if any. If empty, check that the package is running. |
CancellationToken | cancellationToken | The cancellation token for the operation. |
Returns
Type | Description |
---|---|
Task<bool> | True, if the package or application is running, false otherwise. |
IsRunningAsync(string, CancellationToken)
Checks if a specific application is running.
Declaration
Task<bool> IsRunningAsync(string packageName, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | packageName | The package name to check if it is running. |
CancellationToken | cancellationToken | The cancellation token for the operation. |
Returns
Type | Description |
---|---|
Task<bool> | True, if the application is running, false otherwise. |
LaunchAsync(string, TimeSpan?)
Launches an application.
Declaration
Task LaunchAsync(string application, TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
string | application | The application to launch. |
TimeSpan? | timeout | The timeout for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |
LaunchAsync(string, string, TimeSpan?)
Launches an application.
Declaration
Task LaunchAsync(string application, string arguments, TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
string | application | The application to launch. |
string | arguments | The arguments launch with. |
TimeSpan? | timeout | The timeout for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |
LaunchAsync(string, string, CancellationToken)
Launches an application.
Declaration
Task LaunchAsync(string application, string arguments, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | application | The application to launch. |
string | arguments | The arguments launch with. |
CancellationToken | cancellationToken | The cancellation token for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |
LaunchAsync(string, CancellationToken)
Launches an application.
Declaration
Task LaunchAsync(string application, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | application | The application to launch. |
CancellationToken | cancellationToken | The cancellation token for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |
TerminateAsync(string, TimeSpan?)
Terminates an application.
Declaration
Task TerminateAsync(string packageName, TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
string | packageName | The package name to terminate. |
TimeSpan? | timeout | The timeout for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |
TerminateAsync(string, CancellationToken)
Terminates an application.
Declaration
Task TerminateAsync(string packageName, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | packageName | The package name to terminate. |
CancellationToken | cancellationToken | The cancellation token for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |