NotificationBot.FindAllChannelsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns all Channel where predicate is true, and empty array otherwise.
(Ensure the bot app is installed into the General channel, otherwise empty array will be returned.)
public System.Threading.Tasks.Task<Microsoft.TeamsFx.Conversation.Channel[]> FindAllChannelsAsync(Func<Microsoft.TeamsFx.Conversation.Channel,Microsoft.Bot.Schema.Teams.TeamDetails,System.Threading.Tasks.Task<bool>> predicate, System.Threading.CancellationToken cancellationToken = default);
member this.FindAllChannelsAsync : Func<Microsoft.TeamsFx.Conversation.Channel, Microsoft.Bot.Schema.Teams.TeamDetails, System.Threading.Tasks.Task<bool>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamsFx.Conversation.Channel[]>
Public Function FindAllChannelsAsync (predicate As Func(Of Channel, TeamDetails, Task(Of Boolean)), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Channel())
Parameters
- predicate
- Func<Channel,TeamDetails,Task<Boolean>>
Predicate find calls predicate for each channel of the installation.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
An array of Channel where predicate is true, and empty array otherwise.
Exceptions
Throws when predicate is null.