public TeamTab GetTab(HttpClient httpClient, string accessToken, string groupId, string channelId)
 {
     if (_tab != null)
     {
         return _tab;
     }
     else
     {
         var tab = TeamsUtility.GetTab(accessToken, httpClient, groupId, channelId, _id);
         if (string.IsNullOrEmpty(tab.Id))
         {
             var tabs = TeamsUtility.GetTabs(accessToken, httpClient, groupId, channelId);
             if (tabs != null)
             {
                 // find the tab by id
                 tab = tabs.FirstOrDefault(t => t.DisplayName.Equals(_displayName, System.StringComparison.OrdinalIgnoreCase));
             }
         }
         if (tab != null)
         {
             return tab;
         }
         else
         {
             throw new PSArgumentException("Cannot find tab");
         }
     }
 }
Esempio n. 2
0
 public TeamTab GetTabById(HttpClient httpClient, string accessToken, string groupId, string channelId)
 {
     return(TeamsUtility.GetTab(accessToken, httpClient, groupId, channelId, _id));
 }