Пример #1
0
        public void VerifyPullWorkItems()
        {
            IEnumerable <WorkItem> workItems = tfsData.PullData(startDate, endDate);

            foreach (WorkItem wi in workItems)
            {
                Assert.IsTrue(!string.IsNullOrEmpty(wi.Title));
            }
        }
Пример #2
0
        public void VerifyPullChangeSets()
        {
            IEnumerable <Changeset> changesets = tfsData.PullData(startDate, endDate);

            foreach (Changeset cs in changesets)
            {
                Assert.IsTrue(!string.IsNullOrEmpty(cs.Owner));
            }
        }
Пример #3
0
        public override IEnumerable <Event> PullEvents(DateTime startDateTime, DateTime stopDateTime, Func <Event, bool> predicate)
        {
            var meetings = m_outlookDataSource.PullData(startDateTime, stopDateTime);

            var retval = meetings.Select(x =>
                                         new Event()
            {
                Text         = String.Format("{0} {1}", x.Subject ?? String.Empty, x.Body ?? string.Empty),
                Date         = x.StartUtc,
                Duration     = TimeSpan.FromMinutes(x.Duration.TotalMinutes),
                EventType    = "Outlook.Email",
                Participants =
                    x.Recipients.Select(IdentityUtility.Create).ToGraph()
            }).ToList();

            var includeOnlyAliases = new HashSet <string>(m_includeOnlyMailAliasesSetting.Value.Split(new [] { ',' }, StringSplitOptions.RemoveEmptyEntries), StringComparer.OrdinalIgnoreCase);

            if (includeOnlyAliases.Any())
            {
                retval = retval.Where(p => p.Participants.Any(q => includeOnlyAliases.Contains(q.Value.Alias))).ToList();
            }

            return((predicate != null) ? retval.Where(predicate) : retval);
        }
Пример #4
0
        public IEnumerable <Node <WorkItemNode> > PullData(DateTime startDateTime, DateTime endDateTime)
        {
            var wi = m_data.PullData(startDateTime, endDateTime);

            return(TfsHelper.BuildWorkItemGraph(wi));
        }