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/EventActivity.cs

63lines · 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 event activity.
8/// </summary>
9public class EventActivity : Activity
10{
11 /// <summary>
12 /// Gets or sets the name of the event. See <see cref="EventNames"/> for common values.
13 /// </summary>
14 [JsonPropertyName("name")]
15 public string? Name { get; set; }
16
17 /// <summary>
18 /// Initializes a new instance of the <see cref="EventActivity"/> class.
19 /// </summary>
20 public EventActivity() : base(ActivityTypes.Event)
21 {
22 }
23
24 /// <summary>
25 /// Initializes a new instance of the <see cref="EventActivity"/> class with the specified event name.
26 /// </summary>
27 /// <param name="name">The event name.</param>
28 public EventActivity(string name) : base(ActivityTypes.Event)
29 {
30 Name = name;
31 }
32}
33
34/// <summary>
35/// String constants for event activity names.
36/// </summary>
37public static class EventNames
38{
39 /// <summary>
40 /// Read receipt event name.
41 /// </summary>
42 public const string ReadReceipt = "application/vnd.microsoft.readReceipt";
43
44 /// <summary>
45 /// Meeting start event name.
46 /// </summary>
47 public const string MeetingStart = "application/vnd.microsoft.meetingStart";
48
49 /// <summary>
50 /// Meeting end event name.
51 /// </summary>
52 public const string MeetingEnd = "application/vnd.microsoft.meetingEnd";
53
54 /// <summary>
55 /// Meeting participant join event name.
56 /// </summary>
57 public const string MeetingParticipantJoin = "application/vnd.microsoft.meetingParticipantJoin";
58
59 /// <summary>
60 /// Meeting participant leave event name.
61 /// </summary>
62 public const string MeetingParticipantLeave = "application/vnd.microsoft.meetingParticipantLeave";
63}
64