public ReleaseService(IFeedLocator feedLocator) { if (feedLocator == null) { throw new ArgumentNullException("feedLocator"); } _feedLocator = feedLocator; }
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))); }
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))); }
public Package(string path, IFeedLocator feedLocator) : this(feedLocator) { if (!File.Exists(path)) { throw new FileNotFoundException(path); } string filename = System.IO.Path.GetFileName(path); Debug.Assert(filename != null, "filename != null"); if (!PackageRegex.IsMatch(filename)) { throw new ArgumentException(string.Format("Filename does not match regex: {0}", filename)); } Match match = PackageRegex.Match(filename); Id = match.Groups[1].Value; Version = match.Groups[2].Value; Path = path; Created = File.GetCreationTimeUtc(path); Modified = File.GetLastWriteTimeUtc(path); }
public Feed(IFeedLocator feedLocator) { _feedLocator = feedLocator; Packages = new List<Package>(); }
public ReleaseService(IFeedLocator feedLocator) { if (feedLocator == null) throw new ArgumentNullException("feedLocator"); _feedLocator = feedLocator; }
public Feed(IFeedLocator feedLocator) { _feedLocator = feedLocator; Packages = new List <Package>(); }
public Package(IFeedLocator feedLocator) { _feedLocator = feedLocator; }