コード例 #1
0
        /// <summary>
        /// GET Paged teams conversation members asynchronously.
        /// </summary>
        /// <param name="conversations">Conversation instance.</param>
        /// <param name="conversationId">Conversation Id.</param>
        /// <param name="pageSize">Requested Page size</param>
        /// <param name="continuationToken">Continuation token to fetch more pages</param>
        /// <returns>Paged list of members who are part of conversation.</returns>
        public static async Task <TeamsPagedMembersResult> GetTeamsPagedConversationMembersAsync(this IConversations conversations, string conversationId, int?pageSize, string continuationToken = null)
        {
            var pagedMembersResult = await conversations.GetConversationPagedMembersAsync(conversationId, pageSize : pageSize, continuationToken : continuationToken).ConfigureAwait(false);

            var teamsPagedMembersResult = new TeamsPagedMembersResult
            {
                Members           = pagedMembersResult.Members.Select(member => member.AsTeamsChannelAccount()).ToArray(),
                ContinuationToken = pagedMembersResult.ContinuationToken
            };

            return(teamsPagedMembersResult);
        }
コード例 #2
0
 /// <summary>
 /// GetConversationPagedMembers
 /// </summary>
 /// <remarks>
 /// Enumerate the members of a conversation one page at a time.
 ///
 /// This REST API takes a ConversationId. Optionally a pageSize and/or
 /// continuationToken can be provided. It returns a PagedMembersResult, which
 /// contains an array
 /// of ChannelAccounts representing the members of the conversation and a
 /// continuation token that can be used to get more values.
 ///
 /// One page of ChannelAccounts records are returned with each call. The number
 /// of records in a page may vary between channels and calls. The pageSize
 /// parameter can be used as
 /// a suggestion. If there are no additional results the response will not
 /// contain a continuation token. If there are no members in the conversation
 /// the Members will be empty or not present in the response.
 ///
 /// A response to a request that has a continuation token from a prior request
 /// may rarely return members from a previous request.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='conversationId'>
 /// Conversation ID
 /// </param>
 /// <param name='pageSize'>
 /// Suggested page size
 /// </param>
 /// <param name='continuationToken'>
 /// Continuation Token
 /// </param>
 public static PagedMembersResult GetConversationPagedMembers(this IConversations operations, string conversationId, int?pageSize = default(int?), string continuationToken = default(string))
 {
     return(operations.GetConversationPagedMembersAsync(conversationId, pageSize, continuationToken).GetAwaiter().GetResult());
 }