remove duplication in dotnet-restore

This commit is contained in:
Krzysztof Wicher 2017-02-23 11:31:48 -08:00
parent c75d2e446e
commit 3a3025b3af

View file

@ -10,13 +10,11 @@ using System.Diagnostics;
namespace Microsoft.DotNet.Tools.Restore
{
public class RestoreCommand
public class RestoreCommand : MSBuildForwardingApp
{
private MSBuildForwardingApp _forwardingApp;
public RestoreCommand(IEnumerable<string> msbuildArgs, string msbuildPath = null)
: base(msbuildArgs, msbuildPath)
{
_forwardingApp = new MSBuildForwardingApp(msbuildArgs, msbuildPath);
}
public static RestoreCommand FromArgs(string[] args, string msbuildPath = null)
@ -170,15 +168,5 @@ namespace Microsoft.DotNet.Tools.Restore
return cmd.Execute();
}
public ProcessStartInfo GetProcessStartInfo()
{
return _forwardingApp.GetProcessStartInfo();
}
public int Execute()
{
return GetProcessStartInfo().Execute();
}
}
}