CommandLineActivationOperation
CommandLineActivationOperation
CommandLineActivationOperation
CommandLineActivationOperation
Class
Definition
Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Prerelease APIs are identified by a Prerelease label.
[Contains prerelease APIs.]
Provides info about the activation of the app such as what arguments were provided and the current directory path.
public : sealed class CommandLineActivationOperation : ICommandLineActivationOperationpublic sealed class CommandLineActivationOperation : ICommandLineActivationOperationPublic NotInheritable Class CommandLineActivationOperation Implements ICommandLineActivationOperation// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
Remarks
The app supplies the exit code which is passed back to the caller.
Properties
Arguments Arguments Arguments Arguments
Prerelease. Gets the command-line arguments passed to the app when it was activated.
public : PlatForm::String Arguments { get; }public string Arguments { get; }Public ReadOnly Property Arguments As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The command line arguments.
CurrentDirectoryPath CurrentDirectoryPath CurrentDirectoryPath CurrentDirectoryPath
Prerelease. Gets the directory path from which the app was activated from the command line.
public : PlatForm::String CurrentDirectoryPath { get; }public string CurrentDirectoryPath { get; }Public ReadOnly Property CurrentDirectoryPath As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The current directory path.
ExitCode ExitCode ExitCode ExitCode
Prerelease. Sets the exit code for the app that was launched from the command line.
public : int ExitCode { get; set; }public int ExitCode { get; set; }Public ReadWrite Property ExitCode As int// You can use this property in JavaScript.
- Value
- int int int int
The code the app returned when it exits.
Methods
GetDeferral() GetDeferral() GetDeferral() GetDeferral()
Prerelease. Gets a deferral object for this operation.
public : Deferral GetDeferral()public Deferral GetDeferral()Public Function GetDeferral() As Deferral// You can use this method in JavaScript.
A Deferral object that your code uses to signal when it has finished processing the activation.
Examples
// The deferral is only needed if your processing requires async operations
using (Deferral deferral = operation.GetDeferral())
{
var parsedCommands =
ParseUntrustedArgsAsync(activationPath, cmdLineString);
...
}