microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
Tests/Microsoft.Teams.Apps.Tests/Activities/Events/MeetingEventActivityController.cs
45lines · modecode
| 1 | |
| 2 | using Microsoft.Teams.Api.Activities.Events; |
| 3 | using Microsoft.Teams.Apps.Annotations; |
| 4 | |
| 5 | using static Microsoft.Teams.Apps.Activities.Events.Event; |
| 6 | |
| 7 | namespace Microsoft.Teams.Apps.Tests.Activities.Events; |
| 8 | |
| 9 | [TeamsController] |
| 10 | [Obsolete("Use Minimal APIs instead.")] |
| 11 | public class MeetingActivityController |
| 12 | { |
| 13 | public string MethodCalled { get; set; } = string.Empty; |
| 14 | |
| 15 | [MeetingStart] |
| 16 | public async Task Method1(IContext<MeetingStartActivity> context, [Context] IContext.Next next) |
| 17 | { |
| 18 | MethodCalled = "meetingStartMethod"; |
| 19 | await next(); |
| 20 | } |
| 21 | |
| 22 | |
| 23 | [MeetingEnd] |
| 24 | public async Task Method2(IContext<MeetingEndActivity> context, [Context] IContext.Next next) |
| 25 | { |
| 26 | MethodCalled = "meetingEndMethod"; |
| 27 | await next(); |
| 28 | } |
| 29 | |
| 30 | |
| 31 | [MeetingJoin] |
| 32 | public async Task Method3(IContext<MeetingParticipantJoinActivity> context, [Context] IContext.Next next) |
| 33 | { |
| 34 | MethodCalled = "meetingJoinMethod"; |
| 35 | await next(); |
| 36 | } |
| 37 | |
| 38 | |
| 39 | [MeetingLeave] |
| 40 | public async Task Method4(IContext<MeetingParticipantLeaveActivity> context, [Context] IContext.Next next) |
| 41 | { |
| 42 | MethodCalled = "meetingLeaveMethod"; |
| 43 | await next(); |
| 44 | } |
| 45 | } |