Exemple #1
0
        public Feed(FeedConfiguration configuration, IFeedLocator feedLocator)
            : this(feedLocator)
        {
            if (string.IsNullOrEmpty(configuration.PublicPath) || !Directory.Exists(configuration.PublicPath))
                throw new DirectoryNotFoundException(string.Format("Directory not found: {0}", configuration.PublicPath));

            Id = configuration.Id;
            Packages.AddRange(
                Directory.EnumerateFiles(configuration.PrivatePath, "*.nupkg").Select(
                    path => new Package(path, _feedLocator)));
            Packages.AddRange(
                Directory.EnumerateFiles(configuration.PublicPath, "*.nupkg").Select(
                    path => new Package(path, _feedLocator)));
        }
Exemple #2
0
        public Feed(FeedConfiguration configuration, IFeedLocator feedLocator) : this(feedLocator)
        {
            if (string.IsNullOrEmpty(configuration.PublicPath) || !Directory.Exists(configuration.PublicPath))
            {
                throw new DirectoryNotFoundException(string.Format("Directory not found: {0}", configuration.PublicPath));
            }

            Id = configuration.Id;
            Packages.AddRange(
                Directory.EnumerateFiles(configuration.PrivatePath, "*.nupkg").Select(
                    path => new Package(path, _feedLocator)));
            Packages.AddRange(
                Directory.EnumerateFiles(configuration.PublicPath, "*.nupkg").Select(
                    path => new Package(path, _feedLocator)));
        }