private List <DateTime> GetStartAndEndDateOfConversations(string teamMemberId, bool isFileImported = false) { List <DateTime> listOfDates = new List <DateTime>(); try { FetchListServiceResponse <DateTime> startAndEndOfConversation; if (isFileImported == false) { startAndEndOfConversation = _graphService.FetchStartAndEndOfConversation(GetConnectionStringBasedOnSelectedMember(teamMemberId)); } else { startAndEndOfConversation = _graphService.FetchStartAndEndOfConversation(_importConnectionString); } foreach (DateTime date in startAndEndOfConversation.Items) { listOfDates.Add(date); } } catch (Exception e) { throw new Exception(e.Message); } return(listOfDates); }