Exemple #1
0
        public NuGetPackageRepository(PackageRepositoryCreateParameters parameters)
        {
            // First validate the input package source location
            if (!parameters.ValidateLocation())
            {
                throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, Messages.InvalidQueryUrl, parameters.Location));
            }

            this.ResourceProvider = NuGetResourceCollectionFactory.GetResources(parameters.Location, parameters.Request);
            this.baseUrl          = parameters.Location;
        }
 /// <summary>
 /// Ctor's
 /// </summary>
 /// <param name="request"></param>
 /// <param name="physicalPath"></param>
 public LocalPackageRepository(string physicalPath, NuGetRequest request)
 {
     _path = physicalPath;
     // Might want to pass in physicalPath if package discovery is required
     this.ResourceProvider = NuGetResourceCollectionFactory.GetResources(null, request);
 }