[WIP] Removes *3 verbs, making msbuild the driver (#4456)
Removes *3 verbs, making msbuild the driver
This commit is contained in:
parent
55c59d621e
commit
6fcbefa4f7
746 changed files with 4256 additions and 32434 deletions
54
build_projects/dotnet-cli-build/DotNetRestoreProjectJson.cs
Normal file
54
build_projects/dotnet-cli-build/DotNetRestoreProjectJson.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class DotNetRestoreProjectJson : DotNetTool
|
||||
{
|
||||
protected override string Command
|
||||
{
|
||||
get { return "restore-projectjson"; }
|
||||
}
|
||||
|
||||
protected override string Args
|
||||
{
|
||||
get { return $"{GetVerbosity()} {GetFallbackSource()} {GetPackages()}"; }
|
||||
}
|
||||
|
||||
public string FallbackSource { get; set; }
|
||||
|
||||
public string Packages { get; set; }
|
||||
|
||||
public string Verbosity { get; set; }
|
||||
|
||||
private string GetFallbackSource()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(FallbackSource))
|
||||
{
|
||||
return $"--fallbacksource {FallbackSource}";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private string GetPackages()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Packages))
|
||||
{
|
||||
return $"--packages {Packages}";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private string GetVerbosity()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Verbosity))
|
||||
{
|
||||
return $"--verbosity {Verbosity}";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue