Example #1
0
 public HttpRepository(IFileSystem fileSystem, string repositoryName, IHttpRepositoryNavigator navigator)
 {
     _navigator = navigator;
     _fileSystem = fileSystem;
     Name = repositoryName;
     _packagesQuery = LoadPackages(navigator, fileSystem);
 }
Example #2
0
 public HttpPackage(IFileSystem fileSystem,
     IPackageRepository source,
     IHttpRepositoryNavigator httpNavigator,
     PackageItem package)
 {
     _fileSystem = fileSystem;
     _httpNavigator = httpNavigator;
     _package = package;
     Source = source;
 }
Example #3
0
 public HttpPackage(IFileSystem fileSystem,
     IPackageRepository source,
     IHttpRepositoryNavigator httpNavigator,
     PackageItem package)
 {
     _fileSystem = fileSystem;
     _httpNavigator = httpNavigator;
     _package = package;
     _identifier = Lazy.Is(() => new PackageIdentifier(Name, Version));
     Source = source;
 }
        public HttpPackageInfo(IFileSystem fileSystem,
            IPackageRepository source,
            IHttpRepositoryNavigator httpNavigator,
            PackageItem package)
        {
            Source = source;
            _fileSystem = fileSystem;
            _httpNavigator = httpNavigator;
            _package = package;

            _lastModifiedTimeUtc = package.CreationTime;

            Dependencies = (from dependency in _package.Dependencies
                            let strings = dependency.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries)
                            where strings.Length >= 1
                            let dependencyName = strings[0]
                            where !string.IsNullOrEmpty(dependencyName)
                            select new PackageDependency
                            {
                                Name = dependencyName,
                                VersionVertices = DependsParser.ParseVersions(strings.Skip(1).ToArray()).ToList()
                            }).ToList();
        }
Example #5
0
        IEnumerable<HttpPackageInfo> LoadPackages(IHttpRepositoryNavigator navigator, IFileSystem fileSystem)
        {
            IndexDocument = navigator.Index();

            if (IndexDocument == null)
                yield break;
            foreach (var package in IndexDocument.Packages)
                yield return new HttpPackageInfo(fileSystem, this, navigator, package);
        }
Example #6
0
 public HttpRepository(IFileSystem fileSystem, IHttpRepositoryNavigator navigator)
 {
     _navigator = navigator;
     _packagesQuery = from package in navigator.Index().Packages
                       select new HttpPackageInfo(fileSystem, this, navigator, package);
 }