microsoft/TypeAgent

Public

mirrored fromhttps://github.com/microsoft/TypeAgentAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/review-tests-to-test-live

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

dotnet/autoShell/IAppRegistry.cs

47lines · modecode

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