microsoft/teams.net

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
feat/a365-mcp

Branches

Tags

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

Clone

HTTPS

Download ZIP

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

30lines · modecode

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