예제 #1
0
        public async Task <IEnumerable <EntityWithId <WebResourceName, TEntity> > > Get(ICollection <WebResourceName> ids, ILoadEntityLogger logger, TContext context)
        {
            if (ids.Count == 0)
            {
                return new EntityWithId <WebResourceName, TEntity>[] { }
            }
            ;

            using (AutomaticStopwatch.StartInfo(s_logger, string.Format("CardDavRepository.Get ({0} entitie(s))", ids.Count)))
            {
                var entities = await _cardDavDataAccess.GetEntities(ids);

                return(ParallelDeserialize(entities, logger));
            }
        }
예제 #2
0
        public async Task <IReadOnlyList <EntityWithVersion <Uri, vCard> > > Get(ICollection <Uri> ids)
        {
            if (ids.Count == 0)
            {
                return new EntityWithVersion <Uri, vCard>[] { }
            }
            ;

            using (AutomaticStopwatch.StartInfo(s_logger, string.Format("CardDavRepository.Get ({0} entitie(s))", ids.Count)))
            {
                var entities = await _cardDavDataAccess.GetEntities(ids);

                return(ParallelDeserialize(entities));
            }
        }
        private async Task <IReadOnlyList <EntityWithId <WebResourceName, vCard> > > GetInternal(ICollection <WebResourceName> ids, ILoadEntityLogger logger)
        {
            if (ids.Count == 0)
            {
                return new EntityWithId <WebResourceName, vCard>[] { }
            }
            ;

            using (AutomaticStopwatch.StartInfo(s_logger, string.Format("CardDavRepository.Get ({0} entitie(s))", ids.Count)))
            {
                var entities = await _cardDavDataAccess.GetEntities(ids);

                return(ParallelDeserialize(entities, logger));
            }
        }