Show / Hide Table of Contents

Interface IWinApplicationEnvironment

Represents the environment that a device can interact with applications on a Windows platform.

Inherited Members
IApplicationEnvironment.LaunchAsync(string, TimeSpan?)
IApplicationEnvironment.LaunchAsync(string, CancellationToken)
IApplicationEnvironment.LaunchAsync(string, string, TimeSpan?)
IApplicationEnvironment.LaunchAsync(string, string, CancellationToken)
IApplicationEnvironment.TerminateAsync(string, TimeSpan?)
IApplicationEnvironment.TerminateAsync(string, CancellationToken)
IApplicationEnvironment.IsRunningAsync(string, TimeSpan?)
IApplicationEnvironment.IsRunningAsync(string, CancellationToken)
IApplicationEnvironment.IsRunningAsync(string, string, CancellationToken)
IDeviceEnvironment.Name
IDeviceContainer.Device
IHasConnectionStatus.ConnectionStatus
Namespace: Microsoft.XboxStudios.DeviceConsole.Environments.Applications
Assembly: DeviceConsole.Environments.dll
Syntax
public interface IWinApplicationEnvironment : IApplicationEnvironment, IDeviceEnvironment, IDeviceContainer, IHasConnectionStatus

Methods

View Source

GetPackagesAsync(TimeSpan?)

Gets the installed packages on the device.

Declaration
Task<IEnumerable<WinPackageInfo>> GetPackagesAsync(TimeSpan? timeout = null)
Parameters
Type Name Description
TimeSpan? timeout

The timeout for the operation.

Returns
Type Description
Task<IEnumerable<WinPackageInfo>>

An enumerable of package info.

View Source

GetPackagesAsync(CancellationToken)

Gets the installed packages on the device.

Declaration
Task<IEnumerable<WinPackageInfo>> GetPackagesAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

The cancellation token for the operation.

Returns
Type Description
Task<IEnumerable<WinPackageInfo>>

An enumerable of package info.

View Source

InstallAsync(string, TimeSpan?)

Installs an application.

Declaration
Task InstallAsync(string path, TimeSpan? timeout = null)
Parameters
Type Name Description
string path

The path to the application to install.

TimeSpan? timeout

The timeout for the operation.

Returns
Type Description
Task

A task for the asynchronous operation.

View Source

InstallAsync(string, CancellationToken)

Installs an application.

Declaration
Task InstallAsync(string path, CancellationToken cancellationToken)
Parameters
Type Name Description
string path

The path to the application to install.

CancellationToken cancellationToken

The cancellation token for the operation.

Returns
Type Description
Task

A task for the asynchronous operation.

View Source

LaunchAppAndWaitUntilRunningAsync(string, string, TimeSpan?, TimeSpan?)

Launches an app with a specific package and application id, and waits until its finished launching.

Declaration
Task LaunchAppAndWaitUntilRunningAsync(string packageFullName, string applicationId, TimeSpan? interval = null, TimeSpan? timeout = null)
Parameters
Type Name Description
string packageFullName

The package full name (usually similar to SomeGame_1.0.0.0_neutral__a78hwt03br9rj) to launch and wait until running

string applicationId

The id of the application (usually similar to SomeGame_a78hwt03br9rj!SomeGameDevelopment) in the package to launch.

TimeSpan? interval

How long to wait between attempts to check if it's launched.

TimeSpan? timeout

The timeout for the operation.

Returns
Type Description
Task

A task for the asynchronous operation.

View Source

LaunchAppAndWaitUntilRunningAsync(string, string, string, TimeSpan?, TimeSpan?)

Launches an app with a specific package and application id, and waits until its finished launching.

Declaration
Task LaunchAppAndWaitUntilRunningAsync(string packageFullName, string applicationId, string arguments, TimeSpan? interval = null, TimeSpan? timeout = null)
Parameters
Type Name Description
string packageFullName

The package full name (usually similar to SomeGame_1.0.0.0_neutral__a78hwt03br9rj) to launch and wait until running

string applicationId

The id of the application (usually similar to SomeGame_a78hwt03br9rj!SomeGameDevelopment) in the package to launch.

string arguments

The arguments launch with.

TimeSpan? interval

How long to wait between attempts to check if it's launched.

TimeSpan? timeout

The timeout for the operation.

Returns
Type Description
Task

A task for the asynchronous operation.

View Source

LaunchAppAndWaitUntilRunningAsync(string, string, string, TimeSpan?, CancellationToken)

Launches an app with a specific package and application id, and waits until its finished launching.

Declaration
Task LaunchAppAndWaitUntilRunningAsync(string packageFullName, string applicationId, string arguments, TimeSpan? interval, CancellationToken cancellationToken)
Parameters
Type Name Description
string packageFullName

The package full name (usually similar to SomeGame_1.0.0.0_neutral__a78hwt03br9rj) to launch and wait until running

string applicationId

The id of the application (usually similar to SomeGame_a78hwt03br9rj!SomeGameDevelopment) in the package to launch.

string arguments

The arguments launch with.

TimeSpan? interval

How long to wait between attempts to check if it's launched.

CancellationToken cancellationToken

The cancellation token for the operation.

Returns
Type Description
Task

A task for the asynchronous operation.

View Source

LaunchAppAsync(string, string, TimeSpan?)

Launches an app with a specific package and application id.

Declaration
Task LaunchAppAsync(string packageFullName, string applicationId, TimeSpan? timeout = null)
Parameters
Type Name Description
string packageFullName

The package full name (usually similar to SomeGame_1.0.0.0_neutral__a78hwt03br9rj) to launch.

string applicationId

The id of the application (usually similar to SomeGame_a78hwt03br9rj!SomeGameDevelopment) in the package to launch.

TimeSpan? timeout

The timeout for the operation.

Returns
Type Description
Task

A task for the asynchronous operation.

View Source

LaunchAppAsync(string, string, string, CancellationToken)

Launches an app with a specific package and application id.

Declaration
Task LaunchAppAsync(string packageFullName, string applicationId, string arguments, CancellationToken cancellationToken)
Parameters
Type Name Description
string packageFullName

The package full name (usually similar to SomeGame_1.0.0.0_neutral__a78hwt03br9rj) to launch.

string applicationId

The id of the application (usually similar to SomeGame_a78hwt03br9rj!SomeGameDevelopment) in the package 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.

View Source

LaunchAppAsync(string, string, CancellationToken)

Launches an app with a specific package and application id.

Declaration
Task LaunchAppAsync(string packageFullName, string applicationId, CancellationToken cancellationToken)
Parameters
Type Name Description
string packageFullName

The package full name (usually similar to SomeGame_1.0.0.0_neutral__a78hwt03br9rj) to launch.

string applicationId

The id of the application (usually similar to SomeGame_a78hwt03br9rj!SomeGameDevelopment) in the package to launch.

CancellationToken cancellationToken

The cancellation token for the operation.

Returns
Type Description
Task

A task for the asynchronous operation.

View Source

UninstallAsync(string, TimeSpan?)

Uninstalls a package.

Declaration
Task UninstallAsync(string packageFullName, TimeSpan? timeout = null)
Parameters
Type Name Description
string packageFullName

The package full name (usually similar to SomeGame_1.0.0.0_neutral__a78hwt03br9rj) to uninstall

TimeSpan? timeout

The timeout for the operation.

Returns
Type Description
Task

A task for the asynchronous operation.

View Source

UninstallAsync(string, CancellationToken)

Uninstalls a package.

Declaration
Task UninstallAsync(string packageFullName, CancellationToken cancellationToken)
Parameters
Type Name Description
string packageFullName

The package full name (usually similar to SomeGame_1.0.0.0_neutral__a78hwt03br9rj) to uninstall.

CancellationToken cancellationToken

The cancellation token for the operation.

Returns
Type Description
Task

A task for the asynchronous operation.

View Source

WaitUntilRunningAsync(string, Func<Task>, TimeSpan?, TimeSpan?)

Waits until the given package is running.

Declaration
Task WaitUntilRunningAsync(string packageFullName, Func<Task> launchApp, TimeSpan? interval = null, TimeSpan? timeout = null)
Parameters
Type Name Description
string packageFullName

The package full name (usually similar to SomeGame_1.0.0.0_neutral__a78hwt03br9rj) to wait until running.

Func<Task> launchApp

An action which launches the package.

TimeSpan? interval

How long to wait between attempts to check if it's launched.

TimeSpan? timeout

The timeout for the operation.

Returns
Type Description
Task

A task for the asynchronous operation.

View Source

WaitUntilRunningAsync(string, string, Func<Task>, TimeSpan?, CancellationToken)

Waits until the given package is running.

Declaration
Task WaitUntilRunningAsync(string packageFullName, string applicationId, Func<Task> launchApp, TimeSpan? interval, CancellationToken cancellationToken)
Parameters
Type Name Description
string packageFullName

The package full name (usually similar to SomeGame_1.0.0.0_neutral__a78hwt03br9rj) to wait until running

string applicationId

The id of the application (usually similar to SomeGame_a78hwt03br9rj!SomeGameDevelopment) in the package to launch.

Func<Task> launchApp

An action which launches the package.

TimeSpan? interval

How long to wait between attempts to check if it's launched.

CancellationToken cancellationToken

The cancellation token for the operation.

Returns
Type Description
Task

A task for the asynchronous operation.

Extension Methods

IHasConnectionStatusExtensions.IsConnected(IHasConnectionStatus)
  • View Source
In This Article
Back to top Generated by DocFX