46 instantiations of ToolCommand
dotnet (2)
ToolPackage\LocalToolsResolverCache.cs (1)
148new(
ToolPackage\ToolPackageInstance.cs (1)
118Command = new ToolCommand(
dotnet.Tests (31)
CommandFactoryTests\GivenALocalToolsCommandResolver.cs (4)
104= new ToolCommand(toolCommandNameA, "dotnet", fakeExecutable) 137= new ToolCommand(toolCommandNameA, "dotnet", fakeExecutable) 202= new ToolCommand(new ToolCommandName("a"), "dotnet", fakeExecutableA), 209= new ToolCommand(new ToolCommandName("dotnet-a"), "dotnet", fakeExecutableDotnetA)
CommandTests\Tool\List\ToolListGlobalOrToolPathCommandTests.cs (13)
117new ToolCommand(new ToolCommandName("foo"), "dotnet", new FilePath("tool")) 138new ToolCommand(new ToolCommandName("foo"), "dotnet", new FilePath("tool")) 143new ToolCommand(new ToolCommandName("bar"), "dotnet", new FilePath("tool")) 148new ToolCommand(new ToolCommandName("fancy-foo"), "dotnet", new FilePath("tool")) 170new ToolCommand(new ToolCommandName("foo"), "dotnet", new FilePath("tool")) 175new ToolCommand(new ToolCommandName("bar"), "dotnet", new FilePath("tool")) 210new ToolCommand(new ToolCommandName("foo"), "dotnet", new FilePath("tool"))) 230new ToolCommand(new ToolCommandName("foo"), "dotnet", new FilePath("tool")) 236new ToolCommand(new ToolCommandName("fancy-foo"), "dotnet", new FilePath("tool")) 272new ToolCommand(new ToolCommandName("foo"), "dotnet", new FilePath("tool")) 277new ToolCommand(new ToolCommandName("bar"), "dotnet", new FilePath("tool")) 282new ToolCommand(new ToolCommandName("fancy-foo"), "dotnet", new FilePath("tool")) 303new ToolCommand(new ToolCommandName("foo"), "dotnet", new FilePath("tool"))
CommandTests\Tool\Run\ToolRunCommandTests.cs (1)
97= new ToolCommand(toolCommandNameA, "dotnet", fakeExecutable)
ShellShimTests\ShellShimRepositoryTests.cs (13)
35var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", outputDll); 58var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", outputDll); 81var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", outputDll); 104var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", outputDll); 121var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", outputDll); 152var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", new FilePath("dummy.dll")); 209var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", targetExecutablePath); 241var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", new FilePath("dummyExe")); 269var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", targetExecutablePath); 300var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", targetExecutablePath); 338var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", targetExecutablePath); 376var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", new FilePath("dummy.dll")); 406var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", new FilePath("dummy.dll"));
Microsoft.DotNet.PackageInstall.Tests (11)
LocalToolsResolverCacheTests.cs (11)
47new ToolCommand(new ToolCommandName("tool1"), "dotnet", nuGetGlobalPackagesFolder.WithFile("tool1.dll")), 48new ToolCommand(new ToolCommandName("tool2"), "dotnet", nuGetGlobalPackagesFolder.WithFile("tool2.dll")) 87new ToolCommand(new ToolCommandName("tool1"), "dotnet", nuGetGlobalPackagesFolder.WithFile("tool1.dll")), 88new ToolCommand(new ToolCommandName("tool2"), "dotnet", nuGetGlobalPackagesFolder.WithFile("tool2.dll")) 121new ToolCommand(new ToolCommandName("tool1"), "dotnet", nuGetGlobalPackagesFolder.WithFile("tool1.dll")), 122new ToolCommand(new ToolCommandName("tool2"), "dotnet", nuGetGlobalPackagesFolder.WithFile("tool2.dll")) 161new ToolCommand(new ToolCommandName("tool1"), "dotnet", nuGetGlobalPackagesFolder.WithFile("tool1.dll")), 167new ToolCommand(new ToolCommandName("tool1"), "dotnet", nuGetGlobalPackagesFolder.WithFile("tool1new.dll")), 168new ToolCommand(new ToolCommandName("tool2"), "dotnet", nuGetGlobalPackagesFolder.WithFile("tool2new.dll")), 243new ToolCommand(new ToolCommandName("tool1"), "dotnet", nuGetGlobalPackagesFolder.WithFile("tool1.dll")), 300new ToolCommand(new ToolCommandName("tool1"), "dotnet", nuGetGlobalPackagesFolder.WithFile("tool1.dll")),
Microsoft.DotNet.Tools.Tests.ComponentMocks (2)
ToolPackageDownloaderMock.cs (1)
182Command = new ToolCommand(new ToolCommandName(feedPackage.ToolCommandName), "runner", executable),
ToolPackageMock.cs (1)
83return new ToolCommand(
75 references to ToolCommand
dotnet (28)
CommandFactory\CommandResolution\LocalToolsCommandResolver.cs (1)
87out var toolCommand))
Commands\Tool\Install\LocalToolsResolverCacheExtensions.cs (1)
36new Dictionary<RestoredCommandIdentifier, ToolCommand>
Commands\Tool\Restore\ToolPackageRestorer.cs (2)
109IReadOnlyList<ToolCommand> toolPackageCommands) 128out var toolCommand)
Commands\Tool\Restore\ToolRestoreCommand.cs (5)
119Dictionary<RestoredCommandIdentifier, ToolCommand> downloaded = 182private static void EnsureNoCommandNameCollision(Dictionary<RestoredCommandIdentifier, ToolCommand> dictionary) 205public (RestoredCommandIdentifier restoredCommandIdentifier, ToolCommand toolCommand)? SaveToCache { get; } 210(RestoredCommandIdentifier, ToolCommand)? saveToCache, 224(RestoredCommandIdentifier, ToolCommand)? saveToCache,
ShellShim\IShellShimRepository.cs (2)
14void CreateShim(ToolCommand toolCommand, IReadOnlyList<FilePath> packagedShims = null); 16void RemoveShim(ToolCommand toolCommand);
ShellShim\ShellShimRepository.cs (6)
24public void CreateShim(ToolCommand toolCommand, IReadOnlyList<FilePath> packagedShims = null) 116public void RemoveShim(ToolCommand toolCommand) 168private bool ShimExists(ToolCommand toolCommand) 173private IEnumerable<FilePath> GetShimFiles(ToolCommand toolCommand) 178private FilePath GetShimPath(ToolCommand toolCommand) 199ToolCommand toolCommand,
ToolPackage\ILocalToolsResolverCache.cs (2)
11IDictionary<RestoredCommandIdentifier, ToolCommand> restoredCommandMap); 15out ToolCommand toolCommand);
ToolPackage\IToolPackage.cs (1)
24ToolCommand Command { get; }
ToolPackage\LocalToolsResolverCache.cs (7)
32IDictionary<RestoredCommandIdentifier, ToolCommand> restoredCommandMap) 72out ToolCommand toolCommand) 119ToolCommand toolCommand) 134ToolCommand toolCommand) 147ToolCommand toolCommand = 159out ToolCommand toolCommandList) 161(RestoredCommandIdentifier restoredCommandIdentifier, ToolCommand toolCommand)[] matchingRow =
ToolPackage\ToolPackageInstance.cs (1)
32public ToolCommand Command { get; private set; }
dotnet.Tests (25)
CommandFactoryTests\GivenALocalToolsCommandResolver.cs (3)
96new Dictionary<RestoredCommandIdentifier, ToolCommand> 129new Dictionary<RestoredCommandIdentifier, ToolCommand> 194new Dictionary<RestoredCommandIdentifier, ToolCommand>
CommandTests\Tool\Install\ToolInstallLocalCommandTests.cs (3)
313out ToolCommand restoredCommand 422out ToolCommand restoredCommand 567out ToolCommand restoredCommand
CommandTests\Tool\List\ToolListGlobalOrToolPathCommandTests.cs (1)
252private IToolPackage CreateMockToolPackage(string id, string version, ToolCommand command)
CommandTests\Tool\Restore\ToolRestoreCommandTests.cs (1)
143_toolCommandNameA), out ToolCommand restoredCommand)
CommandTests\Tool\Restore\ToolRestoreCommandWithMultipleNugetConfigTests.cs (2)
148_toolCommandNameA), out ToolCommand _) 157_toolCommandNameB), out ToolCommand _)
CommandTests\Tool\Run\ToolRunCommandTests.cs (1)
89new Dictionary<RestoredCommandIdentifier, ToolCommand>
CommandTests\Tool\Update\ToolUpdateLocalCommandTests.cs (1)
422out ToolCommand restoredCommand
ShellShimTests\ShellShimRepositoryTests.cs (13)
35var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", outputDll); 58var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", outputDll); 81var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", outputDll); 104var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", outputDll); 121var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", outputDll); 152var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", new FilePath("dummy.dll")); 209var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", targetExecutablePath); 241var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", new FilePath("dummyExe")); 269var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", targetExecutablePath); 300var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", targetExecutablePath); 338var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", targetExecutablePath); 376var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", new FilePath("dummy.dll")); 406var command = new ToolCommand(new ToolCommandName(shellCommandName), "dotnet", new FilePath("dummy.dll"));
Microsoft.DotNet.PackageInstall.Tests (17)
LocalToolsResolverCacheTests.cs (15)
45IReadOnlyList<ToolCommand> restoredCommands = new[] 85IReadOnlyList<ToolCommand> restoredCommands = new[] 99out ToolCommand tool1).Should().BeTrue(); 104out ToolCommand tool2).Should().BeTrue(); 119IReadOnlyList<ToolCommand> restoredCommands = new[] 138out ToolCommand tool1); 143out ToolCommand tool2); 159IReadOnlyList<ToolCommand> restoredCommands = new[] 165IReadOnlyList<ToolCommand> restoredCommandsNewer = new[] 184out ToolCommand tool1); 188out ToolCommand tool1Newer); 193out ToolCommand tool2Newer); 241IReadOnlyList<ToolCommand> restoredCommands = new[] 270out ToolCommand restoredCommand); 298IReadOnlyList<ToolCommand> restoredCommands = new[]
ToolPackageInstallerNugetCacheTests.cs (2)
50var command = toolPackage.Command; 91var command = toolPackage.Command;
Microsoft.DotNet.Tools.Tests.ComponentMocks (5)
ToolPackageDownloaderMock.cs (1)
345public ToolCommand? Command { get; set; }
ToolPackageMock.cs (4)
19private Lazy<ToolCommand> _command; 36_command = new Lazy<ToolCommand>(GetCommand); 47public ToolCommand Command 71private ToolCommand GetCommand()