microsoft/teams.net

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/move-activity-classes-to-core-again

Branches

Tags

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

Clone

HTTPS

Download ZIP

core/src/Microsoft.Bot.Core/Activities/EndOfConversationActivity.cs

66lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4namespace Microsoft.Bot.Core.Activities;
5
6/// <summary>
7/// Represents an end of conversation activity.
8/// </summary>
9public class EndOfConversationActivity : Activity
10{
11 /// <summary>
12 /// Gets or sets the code for endOfConversation activities that indicates why the conversation ended.
13 /// See <see cref="EndOfConversationCodes"/> for common values.
14 /// </summary>
15 [JsonPropertyName("code")]
16 public string? Code { get; set; }
17
18 /// <summary>
19 /// Gets or sets the text content of the message.
20 /// </summary>
21 [JsonPropertyName("text")]
22 public string? Text { get; set; }
23
24 /// <summary>
25 /// Initializes a new instance of the <see cref="EndOfConversationActivity"/> class.
26 /// </summary>
27 public EndOfConversationActivity() : base(ActivityTypes.EndOfConversation)
28 {
29 }
30}
31
32/// <summary>
33/// String constants for end of conversation codes.
34/// </summary>
35public static class EndOfConversationCodes
36{
37 /// <summary>
38 /// Unknown reason for ending the conversation.
39 /// </summary>
40 public const string Unknown = "unknown";
41
42 /// <summary>
43 /// Conversation completed successfully.
44 /// </summary>
45 public const string CompletedSuccessfully = "completedSuccessfully";
46
47 /// <summary>
48 /// User cancelled the conversation.
49 /// </summary>
50 public const string UserCancelled = "userCancelled";
51
52 /// <summary>
53 /// Bot timed out.
54 /// </summary>
55 public const string BotTimedOut = "botTimedOut";
56
57 /// <summary>
58 /// Bot issued an invalid message.
59 /// </summary>
60 public const string BotIssuedInvalidMessage = "botIssuedInvalidMessage";
61
62 /// <summary>
63 /// Channel failed.
64 /// </summary>
65 public const string ChannelFailed = "channelFailed";
66}
67