Пример #1
0
        public static IEnumerable <IPackageSearchMetadata> Enumerate(
            IPackageFeed packageFeed,
            Task <SearchResult <IPackageSearchMetadata> > searchTask,
            CancellationToken cancellationToken)
        {
            var enumerator = new PackageFeedEnumerator(packageFeed, searchTask, cancellationToken);

            return(new PackageFeedEnumerable(enumerator));
        }
Пример #2
0
        private PackageFeedEnumerator(PackageFeedEnumerator other)
        {
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other));
            }
            _packageFeed       = other._packageFeed;
            _startFromTask     = other._startFromTask;
            _cancellationToken = other._cancellationToken;

            Reset();
        }
Пример #3
0
 public PackageFeedEnumerable(PackageFeedEnumerator enumerator)
 {
     _enumerator = enumerator;
 }