1 write to TargetFile
aspire (1)
DotNet\DotNetAppHostNuGetConfigMergerCandidate.cs (1)
18
TargetFile
= targetFile;
22 references to TargetFile
aspire (15)
Commands\AddCommand.cs (2)
552
[PathNormalizer.ResolveToFilesystemPath(candidate.
TargetFile
.FullName)] = candidate.OriginalContent?.ToArray()
556
await transaction.ApplyPreparedAsync(candidate.
TargetFile
, candidate.ProposedContent,
DotNet\DotNetAppHostNuGetConfigMerger.cs (4)
35
candidate.
TargetFile
,
327
candidate.
TargetFile
.Directory!.Create();
331
await using var stream = candidate.
TargetFile
.Open(
342
string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.UpdateCandidateFileChangedFormat, candidate.
TargetFile
.FullName));
DotNet\DotNetAppHostRestorePreview.cs (5)
63
if (candidate is not null && !BundleNuGetService.IsAncestorDirectory(candidate.
TargetFile
.DirectoryName!, rootProject.DirectoryName!))
67
candidate.
TargetFile
.FullName, rootProject.DirectoryName));
72
: await TemporaryNuGetConfigFile.CreatePreviewAsync(candidate.
TargetFile
, candidate.ProposedContent, cancellationToken);
103
if (!BundleNuGetService.IsAncestorDirectory(candidate!.
TargetFile
.DirectoryName!, Path.GetDirectoryName(path)!))
109
candidate.
TargetFile
, replacement!.ConfigFile, cancellationToken);
Projects\ProjectUpdater.cs (4)
249
PathNormalizer.ResolveToFilesystemPath(configurationCandidate.
TargetFile
.FullName),
271
configurationCandidate.
TargetFile
, configurationCandidate.ProposedContent, cancellationToken)
276
projectFile.Directory!, configurationCandidate!.
TargetFile
, repairReplacement.ConfigFile, cancellationToken);
407
await transaction.ApplyPreparedAsync(configurationCandidate.
TargetFile
, configurationCandidate.ProposedContent,
Aspire.Cli.Tests (7)
DotNet\DotNetAppHostNuGetConfigMergerTests.cs (5)
332
Assert.Empty(XDocument.Load(candidate.
TargetFile
.FullName).Descendants("packageSource"));
1576
Assert.Equal(target.FullName, update.
TargetFile
.FullName);
1596
Assert.Equal(XDocument.Parse(update.GetProposedDocument().OuterXml).ToString(), XDocument.Load(update.
TargetFile
.FullName).ToString());
2210
await File.WriteAllTextAsync(update.
TargetFile
.FullName, createdContent);
2215
Assert.Equal(createdContent, await File.ReadAllTextAsync(update.
TargetFile
.FullName));
NuGet\BundleNuGetServiceTests.cs (2)
108
new XElement("persisted", XDocument.Load(candidate.
TargetFile
.FullName).Root)).ToString(), "xml")
316
Assert.False(candidate.
TargetFile
.Exists);