コード例 #1
0
        public string Resolve()
        {
            NuGetOnlineParameters instance = new NuGetOnlineParameters
            {
                Cache = Bob.NuGet.Cache.Default()
            };

            if (this.parameters != null)
            {
                this.parameters(instance);
            }

            return(this.Resolve(instance));
        }
コード例 #2
0
        private string Resolve(NuGetOnlineParameters parameters)
        {
            string path = parameters.Cache.Resolve();

            if (path == null)
            {
                byte[] data = Container.Network.Get("http://nuget.org/nuget.exe");
                path = Path.Combine(Container.Storage.Temp.Path, "nuget.exe");

                Container.Storage.WriteBytes(path, data);
                parameters.Cache.Apply(path);
            }

            return(path);
        }