1 write to Value
Microsoft.DotNet.InternalAbstractions (1)
FilePath.cs (1)
21
Value
= value;
123 references to Value
dotnet (70)
BuildServer\BuildServerProvider.cs (1)
94
path.
Value
,
BuildServer\RazorPidFile.cs (1)
28
path.
Value
,
BuildServer\RazorServer.cs (4)
27
if (!_fileSystem.File.Exists(PidFile.ServerPath.
Value
))
39
PidFile.ServerPath.
Value
,
66
if (_fileSystem.File.Exists(PidFile.Path.
Value
))
68
_fileSystem.File.Delete(PidFile.Path.
Value
);
CommandFactory\CommandResolution\LocalToolsCommandResolver.cs (2)
89
if (!_fileSystem.File.Exists(toolCommand.Executable.
Value
))
95
return ToolCommandSpecCreator.CreateToolCommandSpec(toolCommand.Name.Value, toolCommand.Executable.
Value
, toolCommand.Runner,
Commands\Tool\Execute\ToolExecuteCommand.cs (1)
135
var commandSpec = ToolCommandSpecCreator.CreateToolCommandSpec(toolPackage.Command.Name.Value, toolPackage.Command.Executable.
Value
, toolPackage.Command.Runner, _allowRollForward, _forwardArguments);
Commands\Tool\Install\ProjectRestorer.cs (4)
25
List<string> argsToPassToRestore = [project.
Value
];
29
argsToPassToRestore.Add(packageLocation.NugetConfig.Value.
Value
);
81
if (line.StartsWith($"{project.
Value
} : ", StringComparison.OrdinalIgnoreCase))
83
line = line.Substring(project.
Value
.Length + 3);
Commands\Tool\Install\ToolInstallLocalCommand.cs (4)
132
manifestFile.
Value
)
143
manifestFile.
Value
));
158
manifestFile.
Value
).Green());
190
manifestFile.
Value
).Green());
Commands\Tool\List\ToolListLocalCommand.cs (2)
86
p => p.SourceManifest.
Value
);
99
Manifest = p.SourceManifest.
Value
Commands\Tool\Restore\ToolPackageRestorer.cs (1)
129
&& _fileSystem.File.Exists(toolCommand.Executable.
Value
);
Commands\Tool\Uninstall\ToolUninstallLocalCommand.cs (1)
65
manifestFile.
Value
).Green());
NugetPackageDownloader\FirstPartyNuGetPackageSigningVerifier.cs (2)
47
using (var packageReader = new PackageArchiveReader(nupkgToVerify.
Value
))
81
var args = new[] { "verify", "--all", nupkgToVerify.
Value
};
NugetPackageDownloader\NuGetPackageDownloader.cs (1)
381
string nugetConfigFileName = Path.GetFileName(packageSourceLocation.NugetConfig.Value.
Value
);
ShellShim\AppHostShimMaker.cs (2)
32
var appHostDestinationFilePath = Path.GetFullPath(shimPath.
Value
);
33
string entryPointFullPath = Path.GetFullPath(entryPoint.
Value
);
ShellShim\ShellShimRepository.cs (14)
26
if (string.IsNullOrEmpty(toolCommand.Executable.
Value
))
53
_fileSystem.File.Copy(packagedShim.Value.
Value
, GetShimPath(toolCommand).
Value
);
54
_filePermissionSetter.SetUserExecutionPermission(GetShimPath(toolCommand).
Value
);
65
var shimPath = GetShimPath(toolCommand).
Value
;
66
string relativePathToExe = Path.GetRelativePath(_shimsDirectory.Value, toolCommand.Executable.
Value
);
109
foreach (var file in GetShimFiles(toolCommand).Where(f => _fileSystem.File.Exists(f.
Value
)))
111
File.Delete(file.
Value
);
124
foreach (var file in GetShimFiles(toolCommand).Where(f => _fileSystem.File.Exists(f.
Value
)))
127
FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(file.
Value
, tempPath));
128
files[file.
Value
] = tempPath;
170
return GetShimFiles(toolCommand).Any(p => _fileSystem.File.Exists(p.
Value
));
206
FilePath[] candidatepackagedShim = [.. packagedShims.Where(s => string.Equals(Path.GetFileName(s.
Value
), Path.GetFileName(GetShimPath(toolCommand).
Value
)))];
ToolManifest\ToolManifestEditor.cs (12)
53
_fileSystem.File.WriteAllText(manifest.
Value
, deserializedManifest.ToJson());
61
manifest.
Value
,
76
_fileSystem.File.WriteAllText(manifest.
Value
, deserializedManifest.ToJson());
106
throw new ArgumentException($"Manifest {manifest.
Value
} does not contain package id '{packageId}'.");
109
_fileSystem.File.WriteAllText(manifest.
Value
, deserializedManifest.ToJson());
115
if (_dangerousFileDetector.IsDangerous(manifest.
Value
))
118
string.Format(CliStrings.ManifestHasMarkOfTheWeb, manifest.
Value
));
138
using (Stream jsonStream = _fileSystem.File.OpenRead(possibleManifest.
Value
))
219
possibleManifest.
Value
, e.Message));
235
errors.Add(string.Format(CliStrings.ManifestMissingIsRoot, path.
Value
));
302
path.
Value
,
431
manifest.
Value
,
ToolManifest\ToolManifestFinder.cs (9)
44
throw new ToolManifestCannotBeFoundException(string.Format(CliStrings.CannotFindAManifestFile, string.Join(Environment.NewLine, allPossibleManifests.Select(f => "\t" + f.manifestfile.
Value
))));
72
if (!_fileSystem.File.Exists(possibleManifest.
Value
))
106
if (!_fileSystem.File.Exists(possibleManifest.
Value
))
138
if (!_fileSystem.File.Exists(possibleManifest.
Value
))
197
if (_fileSystem.File.Exists(possibleManifest.
Value
))
210
throw new ToolManifestCannotBeFoundException(string.Format(CliStrings.CannotFindAManifestFile, string.Join(Environment.NewLine, EnumerateDefaultAllPossibleManifests().Select(f => "\t" + f.manifestfile.
Value
))));
233
|| _fileSystem.File.Exists(currentSearchDirectory.Value.WithFile(".git").
Value
))
279
if (_fileSystem.File.Exists(possibleManifest.
Value
))
297
throw new ToolManifestCannotBeFoundException(string.Format(CliStrings.CannotFindAManifestFile, string.Join(Environment.NewLine, EnumerateDefaultAllPossibleManifests().Select(f => "\t" + f.manifestfile.
Value
))));
ToolPackage\LocalToolsResolverCache.cs (2)
109
return _cacheVersionedDirectory.WithFile(packageId.ToString()).
Value
;
128
PathToExecutable = toolCommand.Executable.
Value
ToolPackage\ToolCommand.cs (1)
24
return $"ToolCommandName: {Name.Value} - Runner: {Runner} - FilePath: {Executable.
Value
}";
ToolPackage\ToolPackageDownloaderBase.cs (1)
380
var runtimeConfigFilePath = Path.ChangeExtension(toolPackageInstance.Command.Executable.
Value
, ".runtimeconfig.json");
ToolPackage\ToolPackageInstance.cs (5)
55
bool usingRidSpecificPackage = _fileSystem.File.Exists(assetsJsonParentDirectory.WithFile(RidSpecificPackageAssetsFileName).
Value
);
60
resolvedAssetsFileNameFullPath = assetsJsonParentDirectory.WithFile(RidSpecificPackageAssetsFileName).
Value
;
64
resolvedAssetsFileNameFullPath = assetsJsonParentDirectory.WithFile(AssetsFileName).
Value
;
166
var lockFile = new LockFileFormat().Read(assetsJsonParentDirectory.WithFile(AssetsFileName).
Value
);
190
var configuration = ToolConfigurationDeserializer.Deserialize(toolConfigurationPath.
Value
, fileSystem);
dotnet.Tests (25)
BuildServerTests\BuildServerProviderTests.cs (2)
131
razorServer.PidFile.Path.
Value
.Should().Be(pidFilePath);
133
razorServer.PidFile.ServerPath.
Value
.Should().Be(serverPath);
CommandFactoryTests\GivenALocalToolsCommandResolver.cs (9)
49
commandPath.Should().Be(fakeExecutable.
Value
);
68
commandPath.Should().Be(fakeExecutable.
Value
);
94
_fileSystem.File.CreateEmptyFile(fakeExecutable.
Value
);
127
_fileSystem.File.CreateEmptyFile(fakeExecutable.
Value
);
145
_fileSystem.File.Delete(fakeExecutable.
Value
);
191
_fileSystem.File.CreateEmptyFile(fakeExecutableA.
Value
);
192
_fileSystem.File.CreateEmptyFile(fakeExecutableDotnetA.
Value
);
220
}).Args!.Trim('"').Should().Be(fakeExecutableA.
Value
);
225
}).Args!.Trim('"').Should().Be(fakeExecutableDotnetA.
Value
);
CommandTests\Tool\Install\ToolInstallLocalCommandTests.cs (2)
425
_fileSystem.File.Exists(restoredCommand.Executable.
Value
);
570
_fileSystem.File.Exists(restoredCommand.Executable.
Value
);
CommandTests\Tool\Restore\ToolRestoreCommandTests.cs (2)
146
_fileSystem.File.Exists(restoredCommand.Executable.
Value
)
147
.Should().BeTrue($"Cached command should be found at {restoredCommand.Executable.
Value
}");
CommandTests\Tool\Run\ToolRunCommandTests.cs (3)
43
result.Args.Should().ContainAll("--roll-forward", "Major", fakeExecutable.
Value
);
63
result.Args.Should().Contain(fakeExecutable.
Value
);
81
fileSystem.File.CreateEmptyFile(fakeExecutable.
Value
);
CommandTests\Tool\Update\ToolUpdateLocalCommandTests.cs (1)
425
_fileSystem.File.Exists(restoredCommand.Executable.
Value
).Should().BeTrue();
ToolManifestTests\ToolManifestFinderTests.cs (6)
702
toolmanifestFilePath.
Value
.Should().Be(manifestPath);
718
toolmanifestFilePath.
Value
.Should().Be(manifestPath);
749
.SourceManifest.
Value
.Should().Be(Path.Combine(_testDirectoryRoot, "sub", _manifestFilename));
752
.SourceManifest.
Value
.Should().Be(Path.Combine(_testDirectoryRoot, _manifestFilename));
755
.SourceManifest.
Value
.Should().Be(Path.Combine(_testDirectoryRoot, "sub", _manifestFilename));
778
createdManifest.
Value
.Should().Be(Path.Combine(_testDirectoryRoot, "dotnet-tools.json"));
Microsoft.DotNet.Configurer (2)
FileSentinel.cs (2)
26
return _fileSystem.File.Exists(_file.
Value
);
31
_fileSystem.CreateIfNotExists(_file.
Value
);
Microsoft.DotNet.InternalAbstractions (2)
FilePath.cs (2)
26
return
Value
;
31
return new DirectoryPath(Path.GetDirectoryName(
Value
)!);
Microsoft.DotNet.PackageInstall.Tests (16)
NuGetPackageInstallerExtractTests.cs (1)
60
result.First().
Value
.Should().Be("/ExtractedPackage/tools/Darwin/mono",
NuGetPackageInstallerTests.cs (1)
361
fileSystem.File.WriteAllText(filePath.Value.
Value
, FormatNuGetConfig(
ToolPackageDownloaderTests.cs (7)
124
.WithFile("project.assets.json").
Value
;
815
fileSystem.File.Exists(package.Command.Executable.
Value
).Should().BeTrue($"{package.Command.Executable.
Value
} should exist");
845
fileSystem.File.Exists(package.Command.Executable.
Value
).Should()
846
.BeTrue($"{package.Command.Executable.
Value
} should exist");
847
package.Command.Executable.
Value
.Should().Contain(store.Root.Value);
931
fileSystem.File.WriteAllText(filePath.Value.
Value
, FormatNuGetConfig(
ToolPackageInstallerNugetCacheTests.cs (5)
52
command.Executable.
Value
.Should().StartWith(expectedPackagesFolder);
55
.Exists(command.Executable.
Value
)
56
.Should().BeTrue($"{command.Executable.
Value
} should exist");
92
command.Executable.
Value
.Should().StartWith(expectedPackagesFolder);
103
Uri = nugetConfig.
Value
,
ToolPackageUninstallerTests.cs (2)
40
package.PackagedShims.Should().ContainSingle(f => f.
Value
.Contains("demo.exe") || f.
Value
.Contains("demo"));
Microsoft.DotNet.Tools.Tests.ComponentMocks (8)
AppHostShellShimMakerMock.cs (2)
26
ExecutablePath = entryPoint.
Value
30
shimPath.
Value
,
ToolPackageDownloaderMock.cs (6)
147
_toolDownloadDir.WithFile("project.assets.json").
Value
,
150
_toolDownloadDir.WithFile(FakeCommandSettingsFileName).
Value
,
174
_fileSystem.File.CreateEmptyFile(executable.
Value
);
280
_fileSystem.File.Exists(possibleNugetConfig.
Value
));
287
&& feed.Uri == probedNugetConfig.
Value
);
309
|| (f.Type == MockFeedType.ExplicitNugetConfig && f.Uri == nugetConfig.
Value
);