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

20lines · modecode

1using Microsoft.Teams.Apps.Plugins;
2
3namespace Microsoft.Teams.Apps.Events;
4
5internal class Topic : List<Func<IPlugin, Event, CancellationToken, Task<object?>>>
6{
7 public async Task<object?> Emit(IPlugin plugin, Event? @event = null, CancellationToken cancellationToken = default)
8 {
9 object? result = null;
10 @event ??= [];
11
12 foreach (var fn in this)
13 {
14 var res = await fn(plugin, @event, cancellationToken);
15 result ??= res;
16 }
17
18 return result;
19 }
20}