microsoft/TypeAgent

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
d4944c6517c9a96a3c419f827769f518913f1b75

Branches

Tags

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

Clone

HTTPS

Download ZIP

dotnet/autoShell/Handlers/IActionHandler.cs

26lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4using System.Collections.Generic;
5using System.Text.Json;
6
7namespace autoShell.Handlers;
8
9/// <summary>
10/// Interface for handlers that process autoShell actions.
11/// </summary>
12internal interface IActionHandler
13{
14 /// <summary>
15 /// Returns the set of action names this handler supports.
16 /// </summary>
17 IEnumerable<string> SupportedActions { get; }
18
19 /// <summary>
20 /// Handles the action identified by <paramref name="key"/>.
21 /// </summary>
22 /// <param name="key">The action name.</param>
23 /// <param name="parameters">The action parameters as a read-only JsonElement.</param>
24 /// <returns>A <see cref="ActionResult"/> describing the outcome.</returns>
25 ActionResult Handle(string key, JsonElement parameters);
26}
27