microsoft/teams.net

Public

mirrored fromhttps://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
aamirj/minimal

Branches

Tags

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

Clone

HTTPS

Download ZIP

Libraries/Microsoft.Teams.Api/Commands/Context.cs

25lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4using System.Text.Json.Serialization;
5
6using Microsoft.Teams.Common;
7
8namespace Microsoft.Teams.Api.Commands;
9
10/// <summary>
11/// The context from which the command originates.
12// Possible values include: 'message', 'compose', 'commandbox'
13/// </summary>
14[JsonConverter(typeof(JsonConverter<Context>))]
15public class Context(string value) : StringEnum(value)
16{
17 public static readonly Context Message = new("message");
18 public bool IsMessage => Message.Equals(Value);
19
20 public static readonly Context Compose = new("compose");
21 public bool IsCompose => Compose.Equals(Value);
22
23 public static readonly Context CommandBox = new("commandbox");
24 public bool IsCommandBox => CommandBox.Equals(Value);
25}