forked from MicrosoftDocs/winrt-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged PR 2037: merge 16225 manifest into master
merge 16225 manifest into master
- Loading branch information
Dave Wilson
committed
Jul 1, 2017
1 parent
3f09460
commit 3a3d0bb
Showing
1,707 changed files
with
36,428 additions
and
1,532 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
windows.applicationmodel.activation/commandlineactivatedeventargs.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
-api-id: T:Windows.ApplicationModel.Activation.CommandLineActivatedEventArgs | ||
-api-type: winrt class | ||
--- | ||
|
||
<!-- Class syntax. | ||
public class CommandLineActivatedEventArgs : IActivatedEventArgs, IActivatedEventArgsWithUser, ICommandLineActivatedEventArgs | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.CommandLineActivatedEventArgs | ||
|
||
## -description | ||
Provides information, such as the command-line arguments, when an app is activated from the command line. | ||
|
||
## -remarks | ||
A UWP app may be activated from **Start|Run** in Windows, from the command line in PowerShell, the DOS command prompt, or from another Win32 process that calls [CreateProcess()](https://msdn.microsoft.com/library/windows/desktop/ms682425.aspx). | ||
|
||
To be activated from the command line, your app must register for the "AppExecutionAlias" extension category in its manifest. | ||
|
||
```xml | ||
<uap5:Extension Category="windows.appExecutionAlias" Executable="FruitSalad.exe" EntryPoint="Windows.FruitSalad.Bananas.App"> | ||
<uap5:AppExecutionAlias > | ||
<uap5:ExecutionAlias Alias="Fs.exe" /> | ||
</uap5:AppExecutionAlias> | ||
</uap5:Extension> | ||
``` | ||
After you register in your manifest, your app can be activated from the command line. When your app is activated, you can use the event information to identify the call activation and extract the parameters that help you complete the call for the user. | ||
|
||
## -examples | ||
Here is an example of handling a command-line launch: | ||
|
||
```csharp | ||
protected override void OnActivated(IActivatedEventArgs args) | ||
{ | ||
string activationArgString = string.Empty; | ||
string activationPath = string.Empty; | ||
string cmdLineString = string.Empty; | ||
|
||
// Existing behavior to differentiate different activation kinds, | ||
// and to extract any argument payload. | ||
switch (args.Kind) | ||
{ | ||
case ActivationKind.Launch: | ||
var launchArgs = args as LaunchActivatedEventArgs; | ||
activationArgString = launchArgs.Arguments; | ||
break; | ||
|
||
// A new ActivationKind for console activation of a windowed app. | ||
case ActivationKind.CommandLineLaunch: | ||
CommandLineActivatedEventArgs cmdLineArgs = args as CommandLineActivatedEventArgs; | ||
CommandLineActivationOperation operation = cmdLineArgs.Operation; | ||
cmdLineString = operation.Arguments; | ||
activationPath = operation.CurrentDirectoryPath; | ||
break; | ||
} | ||
|
||
// Parse the trusted activation arguments. | ||
ParseTrustedArgs(activationArgString); | ||
|
||
// Parse the untrusted command-line arguments. | ||
ParseUntrustedArgs(activationPath, cmdLineString); | ||
|
||
// Since we did not take a deferral, the calling app gets the result | ||
// as soon as this method returns. Since we did not set an exit code, | ||
// the calling app gets a default exit code as the result. | ||
} | ||
``` | ||
|
||
## -see-also |
23 changes: 23 additions & 0 deletions
23
windows.applicationmodel.activation/commandlineactivatedeventargs_kind.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
-api-id: P:Windows.ApplicationModel.Activation.CommandLineActivatedEventArgs.Kind | ||
-api-type: winrt property | ||
--- | ||
|
||
<!-- Property syntax. | ||
public ActivationKind Kind { get; } | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.CommandLineActivatedEventArgs.Kind | ||
|
||
## -description | ||
Gets the type of activation that launched the app. | ||
|
||
## -property-value | ||
The activation kind. | ||
|
||
## -remarks | ||
The expected value is **ActivationKind.CommandLineLaunch**. | ||
|
||
## -see-also | ||
|
||
## -examples |
24 changes: 24 additions & 0 deletions
24
windows.applicationmodel.activation/commandlineactivatedeventargs_operation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
-api-id: P:Windows.ApplicationModel.Activation.CommandLineActivatedEventArgs.Operation | ||
-api-type: winrt property | ||
--- | ||
|
||
<!-- Property syntax. | ||
public CommandLineActivationOperation Operation { get; } | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.CommandLineActivatedEventArgs.Operation | ||
|
||
## -description | ||
Gets info about the activation of the app such as what arguments were provided and the current directory path. | ||
|
||
## -property-value | ||
The activation info. | ||
|
||
## -remarks | ||
The app supplies the exit code which is passed back to the caller. | ||
|
||
## -see-also | ||
[CommandLineActivatedEventArgs.Operation](commandlineactivatedeventargs_operation.md) | ||
|
||
## -examples |
22 changes: 22 additions & 0 deletions
22
...icationmodel.activation/commandlineactivatedeventargs_previousexecutionstate.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
-api-id: P:Windows.ApplicationModel.Activation.CommandLineActivatedEventArgs.PreviousExecutionState | ||
-api-type: winrt property | ||
--- | ||
|
||
<!-- Property syntax. | ||
public ApplicationExecutionState PreviousExecutionState { get; } | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.CommandLineActivatedEventArgs.PreviousExecutionState | ||
|
||
## -description | ||
Gets the execution state of the app before it was activated. | ||
|
||
## -property-value | ||
The execution state before the app was activated. | ||
|
||
## -remarks | ||
|
||
## -see-also | ||
|
||
## -examples |
22 changes: 22 additions & 0 deletions
22
windows.applicationmodel.activation/commandlineactivatedeventargs_splashscreen.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
-api-id: P:Windows.ApplicationModel.Activation.CommandLineActivatedEventArgs.SplashScreen | ||
-api-type: winrt property | ||
--- | ||
|
||
<!-- Property syntax. | ||
public SplashScreen SplashScreen { get; } | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.CommandLineActivatedEventArgs.SplashScreen | ||
|
||
## -description | ||
Gets info about the transition from the splash screen to the activated app. | ||
|
||
## -property-value | ||
The splash screen transition info. | ||
|
||
## -remarks | ||
|
||
## -see-also | ||
|
||
## -examples |
22 changes: 22 additions & 0 deletions
22
windows.applicationmodel.activation/commandlineactivatedeventargs_user.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
-api-id: P:Windows.ApplicationModel.Activation.CommandLineActivatedEventArgs.User | ||
-api-type: winrt property | ||
--- | ||
|
||
<!-- Property syntax. | ||
public User User { get; } | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.CommandLineActivatedEventArgs.User | ||
|
||
## -description | ||
Gets the user that the app was activated for. | ||
|
||
## -property-value | ||
The user that the app was activated for. | ||
|
||
## -remarks | ||
|
||
## -see-also | ||
|
||
## -examples |
20 changes: 20 additions & 0 deletions
20
windows.applicationmodel.activation/commandlineactivationoperation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
-api-id: T:Windows.ApplicationModel.Activation.CommandLineActivationOperation | ||
-api-type: winrt class | ||
--- | ||
|
||
<!-- Class syntax. | ||
public class CommandLineActivationOperation | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.CommandLineActivationOperation | ||
|
||
## -description | ||
Provides info about the activation of the app such as what arguments were provided and the current directory path. | ||
|
||
## -remarks | ||
The app supplies the exit code which is passed back to the caller. | ||
|
||
## -see-also | ||
|
||
## -examples |
22 changes: 22 additions & 0 deletions
22
windows.applicationmodel.activation/commandlineactivationoperation_arguments.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
-api-id: P:Windows.ApplicationModel.Activation.CommandLineActivationOperation.Arguments | ||
-api-type: winrt property | ||
--- | ||
|
||
<!-- Property syntax. | ||
public string Arguments { get; } | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.CommandLineActivationOperation.Arguments | ||
|
||
## -description | ||
Gets the command-line arguments passed to the app when it was activated. | ||
|
||
## -property-value | ||
The command line arguments. | ||
|
||
## -remarks | ||
|
||
## -see-also | ||
|
||
## -examples |
22 changes: 22 additions & 0 deletions
22
...licationmodel.activation/commandlineactivationoperation_currentdirectorypath.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
-api-id: P:Windows.ApplicationModel.Activation.CommandLineActivationOperation.CurrentDirectoryPath | ||
-api-type: winrt property | ||
--- | ||
|
||
<!-- Property syntax. | ||
public string CurrentDirectoryPath { get; } | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.CommandLineActivationOperation.CurrentDirectoryPath | ||
|
||
## -description | ||
Gets the directory path from which the app was activated from the command line. | ||
|
||
## -property-value | ||
The current directory path. | ||
|
||
## -remarks | ||
|
||
## -see-also | ||
|
||
## -examples |
22 changes: 22 additions & 0 deletions
22
windows.applicationmodel.activation/commandlineactivationoperation_exitcode.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
-api-id: P:Windows.ApplicationModel.Activation.CommandLineActivationOperation.ExitCode | ||
-api-type: winrt property | ||
--- | ||
|
||
<!-- Property syntax. | ||
public int ExitCode { get; set; } | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.CommandLineActivationOperation.ExitCode | ||
|
||
## -description | ||
Sets the exit code for the app that was launched from the command line. | ||
|
||
## -property-value | ||
The code the app returned when it exits. | ||
|
||
## -remarks | ||
|
||
## -see-also | ||
|
||
## -examples |
32 changes: 32 additions & 0 deletions
32
...icationmodel.activation/commandlineactivationoperation_getdeferral_254836512.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
-api-id: M:Windows.ApplicationModel.Activation.CommandLineActivationOperation.GetDeferral | ||
-api-type: winrt method | ||
--- | ||
|
||
<!-- Method syntax. | ||
public Deferral CommandLineActivationOperation.GetDeferral() | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.CommandLineActivationOperation.GetDeferral | ||
|
||
## -description | ||
Gets a deferral object for this operation. | ||
|
||
## -returns | ||
A **Deferral** object that your code uses to signal when it has finished processing the activation. | ||
|
||
## -remarks | ||
|
||
## -see-also | ||
|
||
## -examples | ||
```csharp | ||
// The deferral is only needed if your processing requires async operations | ||
using (Deferral deferral = operation.GetDeferral()) | ||
{ | ||
var parsedCommands = | ||
ParseUntrustedArgsAsync(activationPath, cmdLineString); | ||
... | ||
} | ||
|
||
``` |
20 changes: 20 additions & 0 deletions
20
windows.applicationmodel.activation/icommandlineactivatedeventargs.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
-api-id: T:Windows.ApplicationModel.Activation.ICommandLineActivatedEventArgs | ||
-api-type: winrt interface | ||
--- | ||
|
||
<!-- Interface syntax. | ||
public interface ICommandLineActivatedEventArgs : IActivatedEventArgs | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.ICommandLineActivatedEventArgs | ||
|
||
## -description | ||
Defines the interface for providing info, such as the command-line arguments, when an app is activated from the command line. | ||
|
||
## -remarks | ||
|
||
## -see-also | ||
[CommandLineActivatedEventArgs](commandlineactivatedeventargs.md) | ||
|
||
## -examples |
23 changes: 23 additions & 0 deletions
23
windows.applicationmodel.activation/icommandlineactivatedeventargs_operation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
-api-id: P:Windows.ApplicationModel.Activation.ICommandLineActivatedEventArgs.Operation | ||
-api-type: winrt property | ||
--- | ||
|
||
<!-- Property syntax. | ||
public CommandLineActivationOperation Operation { get; } | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.ICommandLineActivatedEventArgs.Operation | ||
|
||
## -description | ||
Provides info about the activation of the app such as what arguments were provided and the current directory path. | ||
|
||
## -property-value | ||
The activation info. | ||
|
||
## -remarks | ||
The app supplies the exit code which is passed back to the caller. | ||
|
||
## -see-also | ||
|
||
## -examples |
21 changes: 21 additions & 0 deletions
21
windows.applicationmodel.activation/istartuptaskactivatedeventargs.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
-api-id: T:Windows.ApplicationModel.Activation.IStartupTaskActivatedEventArgs | ||
-api-type: winrt interface | ||
--- | ||
|
||
<!-- Interface syntax. | ||
public interface IStartupTaskActivatedEventArgs : IActivatedEventArgs | ||
--> | ||
|
||
# Windows.ApplicationModel.Activation.IStartupTaskActivatedEventArgs | ||
|
||
## -description | ||
Provides information when an app is activated at device startup or user login. | ||
|
||
## -remarks | ||
This functionality is only supported on Windows Desktop. | ||
|
||
## -see-also | ||
[Windows.ApplicationModel.Activation.StartupTaskActivatedEventArgs](startuptaskactivatedeventargs.md) | ||
|
||
## -examples |
Oops, something went wrong.