microsoft/teams.net

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v2.0.0-preview.5

Branches

Tags

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

Clone

HTTPS

Download ZIP

Libraries/Microsoft.Teams.Apps/Events/ActivityResponseEvent.cs

27lines · modecode

1using Microsoft.Teams.Apps.Plugins;
2
3namespace Microsoft.Teams.Apps.Events;
4
5public class ActivityResponseEvent : Event
6{
7 public required Response Response { get; set; }
8}
9
10public static partial class AppEventExtensions
11{
12 public static App OnActivityResponse(this App app, Action<ISenderPlugin, ActivityResponseEvent> handler)
13 {
14 return app.OnEvent(EventType.ActivityResponse, (plugin, @event) =>
15 {
16 handler((ISenderPlugin)plugin, (ActivityResponseEvent)@event);
17 });
18 }
19
20 public static App OnActivityResponse(this App app, Func<ISenderPlugin, ActivityResponseEvent, CancellationToken, Task> handler)
21 {
22 return app.OnEvent(EventType.ActivityResponse, (plugin, @event, token) =>
23 {
24 return handler((ISenderPlugin)plugin, (ActivityResponseEvent)@event, token);
25 });
26 }
27}