public static Response Push(NuGetPushRequest request) { var console = new Console(); var command = new PushCommand { Source = request.NugetHost, ApiKey = request.ApiKey, Console = console, Verbosity = Verbosity.Detailed, }; command.Arguments.Add(request.Package); try { command.Execute(); } catch (Exception e) { console.WriteError(e); } return new Response(console.Messages); }
public static Response Push(NuGetPushRequest request) { var console = new Console(); var command = new PushCommand { Source = request.NugetHost, ApiKey = request.ApiKey, Console = console, Verbosity = Verbosity.Detailed, }; command.Arguments.Add(request.Package); try { command.Execute(); } catch (Exception e) { console.WriteError(e.ToString()); } return(new Response(console.Messages)); }