Пример #1
0
        public NuGetSetProxyFixture()
        {
            Url = "http://a.com";

            Settings = new NuGetSetProxySettings();

            Process.GetStandardOutput()
            .Returns(new string[] { });
        }
Пример #2
0
        public static void NuGetSetProxy(this ICakeContext context, string proxy, string username, string password, NuGetSetProxySettings settings)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            var resolver = new NuGetToolResolver(context.FileSystem, context.Environment, context.Tools);
            var runner   = new NuGetSetProxy(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools, resolver);

            runner.SetProxy(proxy, username, password, settings);
        }