PlayerApplication.RunAsync
Section titled “PlayerApplication.RunAsync”
- Runs a frozen game deployment using explicitly supplied host services.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Player.Runtime
Declaration
Section titled “Declaration”public static System.Threading.Tasks.Task<int> Inno.Player.Runtime.PlayerApplication.RunAsync(Inno.Player.Runtime.PlayerLaunchOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))Parameters
Section titled “Parameters”Parameter options: The prepared content and platform service composition.
Parameter cancellationToken: Requests termination of frame scheduling.
Returns
Section titled “Returns”Zero after orderly shutdown; startup, execution and retirement failures propagate.
Remarks
Section titled “Remarks”Hosts must preserve their owner thread across asynchronous startup and frame callbacks using their synchronization context. A blocking host can use OwnerThreadExecution.Run.
Exceptions
Section titled “Exceptions”Exception T:System.ArgumentNullException: Options or a required host service is null.
Exception T:System.OperationCanceledException: Frame scheduling was canceled.
Exception T:System.IO.InvalidDataException: Deployment metadata, linked code, or the prepared content identity is inconsistent.
Exception T:System.InvalidOperationException: A host factory does not provide its required product, or runtime startup or retirement fails.