microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
Libraries/Microsoft.Teams.Api/Commands/Context.cs
25lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using System.Text.Json.Serialization; |
| 5 | |
| 6 | using Microsoft.Teams.Common; |
| 7 | |
| 8 | namespace 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>))] |
| 15 | public 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 | } |