public IPageOfItems <ScheduleItem> GetScheduleItemsByFlag(PagingInfo pagingInfo, Event evnt, string flagName) { return (cache.GetItems <IPageOfItems <ScheduleItem>, ScheduleItem>( string.Format("GetScheduleItems-Event:{0},Flag:{1}", evnt.Name, flagName), pagingInfo.ToCachePartition(), () => repository.GetScheduleItemsByFlag(pagingInfo, evnt, flagName).FillTags(tagService), si => si.GetDependencies() )); }
public IPageOfItems <ScheduleItem> GetScheduleItemsByFlag(int pageIndex, int pageSize, EventAddress eventAddress, string flagName) { var result = cache.GetItems <IPageOfItems <ScheduleItem>, ScheduleItem>( string.Format("GetScheduleItems-Event:{0},Flag:{1}", eventAddress.EventName, flagName), new CachePartition(pageIndex, pageSize), () => repository.GetScheduleItemsByFlag(eventAddress, flagName).GetPage(pageIndex, pageSize).FillTags(tagService), si => si.GetDependencies() ); SetScheduleItemUsers(result); return(result); }