コード例 #1
0
        public async Task <IEnumerable <TVProgram> > SearchPrograms(DateTimeOffset dateTime, string channelName)
        {
            SpecificationBase <TVProgram> searchSpecification = TVProgramByPeriodSpecification.For(dateTime) /*
                                                                                                              * .And(TVPRogramByDurationSpecification.For(30))*/;

            if (!String.IsNullOrWhiteSpace(channelName))
            {
                searchSpecification = searchSpecification
                                      .And(TVProgramByChannelSpecification.For(channelName));
            }

            var tableQuery = searchSpecification
                             .ToTableQuery();

            var querySegment = await base.cloudTable
                               .ExecuteQuerySegmentedAsync <TVProgram>(tableQuery, new TableContinuationToken());

            return(querySegment.ToList());
        }