-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy pathIAppRegistry.cs
More file actions
47 lines (39 loc) · 1.63 KB
/
Copy pathIAppRegistry.cs
File metadata and controls
47 lines (39 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Collections.Generic;
namespace autoShell;
/// <summary>
/// Registry of known applications, mapping friendly names to executable paths,
/// AppUserModelIDs, and startup metadata. Shared across handlers that need
/// to resolve, launch, or manipulate applications by friendly name.
/// </summary>
internal interface IAppRegistry
{
/// <summary>
/// Gets the executable path for a friendly app name, or null if unknown.
/// </summary>
string GetExecutablePath(string friendlyName);
/// <summary>
/// Gets the AppUserModelID for a friendly app name, or null if unknown.
/// Used as a fallback to launch apps via the shell AppsFolder.
/// </summary>
string GetAppUserModelId(string friendlyName);
/// <summary>
/// Resolves a friendly name to a process name (filename without extension).
/// Returns the input unchanged if the friendly name is not in the registry.
/// </summary>
string ResolveProcessName(string friendlyName);
/// <summary>
/// Gets the working directory environment variable for a friendly app name, or null.
/// The caller should expand it via Environment.ExpandEnvironmentVariables.
/// </summary>
string GetWorkingDirectoryEnvVar(string friendlyName);
/// <summary>
/// Gets extra command-line arguments for a friendly app name, or null.
/// </summary>
string GetArguments(string friendlyName);
/// <summary>
/// Returns all known installed application names (from the shell AppsFolder).
/// </summary>
IEnumerable<string> GetAllAppNames();
}