Ejemplo n.º 1
0
        private static void RaiseDataLoaded(CachableDataTypes item, int records)
        {
            var eh = OnDataLoaded;

            if (eh != null)
            {
                eh(null, new DataLoadedEventArgs(item.ToString(), records));
            }
        }
Ejemplo n.º 2
0
        public static async Task<nAssembla.Cache.DataCache> LoadCachableData(DTO.Space space, CachableDataTypes types)
        {
            var dataCache = new nAssembla.Cache.DataCache();
            var spaceCache = new nAssembla.Cache.SpaceDataCache();
            dataCache.Spaces[space.Id] = spaceCache;

            if ((types & CachableDataTypes.Components) == CachableDataTypes.Components)
            {
                spaceCache.Components = await new TicketComponentProxy().GetListAsync();
                RaiseDataLoaded(CachableDataTypes.Components, spaceCache.Components.Count());
            }

            if ((types & CachableDataTypes.Milestones) == CachableDataTypes.Milestones)
            {
                spaceCache.Milestones = await new MilestoneProxy().GetListAsync();
                RaiseDataLoaded(CachableDataTypes.Milestones, spaceCache.Milestones.Count());
            }

            return dataCache;
        }
Ejemplo n.º 3
0
        public static async Task <nAssembla.Cache.DataCache> LoadCachableData(DTO.Space space, CachableDataTypes types)
        {
            var dataCache  = new nAssembla.Cache.DataCache();
            var spaceCache = new nAssembla.Cache.SpaceDataCache();

            dataCache.Spaces[space.Id] = spaceCache;

            if ((types & CachableDataTypes.Components) == CachableDataTypes.Components)
            {
                spaceCache.Components = await new TicketComponentProxy().GetListAsync();
                RaiseDataLoaded(CachableDataTypes.Components, spaceCache.Components.Count());
            }

            if ((types & CachableDataTypes.Milestones) == CachableDataTypes.Milestones)
            {
                spaceCache.Milestones = await new MilestoneProxy().GetListAsync();
                RaiseDataLoaded(CachableDataTypes.Milestones, spaceCache.Milestones.Count());
            }

            return(dataCache);
        }
Ejemplo n.º 4
0
 private static void RaiseDataLoaded(CachableDataTypes item, int records)
 {
     var eh = OnDataLoaded;
     if(eh != null)
         eh(null, new DataLoadedEventArgs(item.ToString(), records));
 }