Exemplo n.º 1
0
        public static NuGetRoutes Build(IRecorder recorder, IArtifactSaver artifact, Config config)
        {
            var proxies = new Dictionary <string, NuGetProxy>();

            foreach (var repo in config.repos.nuget)
            {
                var name = repo.name ?? throw new Exception("NuGet repo name is missing.");
                var url  = repo.url ?? throw new Exception("NuGet repo url is missing.");

                proxies.Add(name, new NuGetProxy(recorder, name, url));
            }

            return(new NuGetRoutes(proxies, artifact));
        }
Exemplo n.º 2
0
 private NuGetRoutes(Dictionary <string, NuGetProxy> proxies, IArtifactSaver artifact)
 {
     this.proxies  = proxies;
     this.artifact = artifact;
 }
Exemplo n.º 3
0
 public ArtifactRoutes(IArtifactSaver artifact)
 {
     this.artifact = artifact;
 }
Exemplo n.º 4
0
 private NpmRoutes(IRecorder recorder, IArtifactSaver artifact, string registryUrl)
 {
     this.recorder    = recorder;
     this.artifact    = artifact;
     this.registryUrl = registryUrl;
 }