Skip to content

Commit

Permalink
Merged PR 2037: merge 16225 manifest into master
Browse files Browse the repository at this point in the history
merge 16225 manifest into master
  • Loading branch information
Dave Wilson committed Jul 1, 2017
1 parent 3f09460 commit 3a3d0bb
Show file tree
Hide file tree
Showing 1,707 changed files with 36,428 additions and 1,532 deletions.
10 changes: 8 additions & 2 deletions windows.applicationmodel.activation/activationkind.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,14 @@ Reserved for system use. Introduced in Windows 10, version 1703 (10.0.15063).
### -field PrintWorkflowForegroundTask:1018
This app was activated because the user is printing to a printer that has a Print Workflow Application associated with it which has requested user input. Prerelease.

### -field Console:1019
The app was launched because it was activated from the command line. Prerelease.
### -field GameUIProvider:1019


### -field StartupTask:1020


### -field CommandLineLaunch:1021
The app was launched from the command line. Prerelease.

## -remarks

Expand Down
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
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
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
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
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
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
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
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
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
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
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);
...
}

```
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
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
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
Loading

0 comments on commit 3a3d0bb

Please sign in to comment.