3 writes to CurrentWorkingDirectory
Aspire.Dashboard (3)
ServiceClient\DashboardRunStore.cs (3)
132
CurrentWorkingDirectory
= _temporaryDirectory;
141
CurrentWorkingDirectory
= Path.Combine(_runsDirectory, runId);
158
CurrentWorkingDirectory
= Path.Combine(resumesDirectory, _applicationMarkerFileName);
49 references to CurrentWorkingDirectory
Aspire.Dashboard (18)
ServiceClient\DashboardRunStore.cs (18)
133
DatabasePath = Path.Combine(
CurrentWorkingDirectory
, DatabaseFileName);
134
_runLock = OpenRunLock(
CurrentWorkingDirectory
);
142
DatabasePath = Path.Combine(
CurrentWorkingDirectory
, DatabaseFileName);
145
File.WriteAllText(Path.Combine(
CurrentWorkingDirectory
, _applicationMarkerFileName), string.Empty);
153
_metadataPath = Path.Combine(
CurrentWorkingDirectory
, "run.json");
159
DatabasePath = Path.Combine(
CurrentWorkingDirectory
, DatabaseFileName);
160
DirectoryHelper.CreateWithOwnerOnlyPermissions(
CurrentWorkingDirectory
);
162
CurrentWorkingDirectory
,
208
CurrentWorkingDirectory
,
214
var temporaryRoot = Directory.GetParent(
CurrentWorkingDirectory
)!.FullName;
217
if (string.Equals(directory,
CurrentWorkingDirectory
, StringComparison.OrdinalIgnoreCase) ||
245
GetRunLockPath(
CurrentWorkingDirectory
));
367
DeleteUnheldLocks(_runsDirectory, "*.lock", GetRunLockPath(
CurrentWorkingDirectory
));
396
CreateDescriptor(_metadata,
CurrentWorkingDirectory
, isCurrent: true)
403
if (string.Equals(directory,
CurrentWorkingDirectory
, StringComparison.OrdinalIgnoreCase))
450
_runsDirectory ??
CurrentWorkingDirectory
,
469
else if (PersistenceMode == DashboardPersistenceMode.Run && Directory.Exists(
CurrentWorkingDirectory
))
473
_deleteRunDirectory(
CurrentWorkingDirectory
);
Aspire.Dashboard.Tests (31)
Model\DashboardDataSourceTests.cs (31)
42
Assert.Equal(expectedRunsDirectory, Directory.GetParent(runStore.
CurrentWorkingDirectory
)!.FullName);
43
Assert.True(File.Exists(Path.Combine(runStore.
CurrentWorkingDirectory
, applicationDirectoryName)));
57
Assert.Equal(Path.Combine(expectedResumesDirectory, applicationDirectoryName), runStore.
CurrentWorkingDirectory
);
121
Assert.Equal(runStore.RunId, Path.GetFileName(runStore.
CurrentWorkingDirectory
));
136
Assert.Equal(secondRunStore.RunId, Path.GetFileName(secondRunStore.
CurrentWorkingDirectory
));
139
Assert.True(File.Exists(Path.Combine(secondRunStore.
CurrentWorkingDirectory
, applicationDirectoryName)));
186
var metadataPath = Path.Combine(runStore.
CurrentWorkingDirectory
, "run.json");
220
using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(runStore.
CurrentWorkingDirectory
, "run.json")));
243
metadataPath = Path.Combine(historicalRunStore.
CurrentWorkingDirectory
, "run.json");
300
using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(currentRunStore.
CurrentWorkingDirectory
, "run.json")));
328
Assert.False(File.Exists(Path.Combine(runStore.
CurrentWorkingDirectory
, "run.json")));
355
$"Dashboard run store initialized with persistence mode 'Run'. Current working directory: '{runStore.
CurrentWorkingDirectory
}'. Database path: '{runStore.DatabasePath}'.",
362
$"Dashboard run discovery completed in directory '{Directory.GetParent(runStore.
CurrentWorkingDirectory
)!.FullName}'. Run count: 1. Run IDs: {runStore.RunId}.",
377
runDirectory = runStore.
CurrentWorkingDirectory
;
422
runDirectory = runStore.
CurrentWorkingDirectory
;
491
Assert.True(File.Exists(DashboardRunStore.GetRunLockPath(runStore.
CurrentWorkingDirectory
)));
544
Assert.True(Directory.Exists(activeRunStore.
CurrentWorkingDirectory
));
545
Assert.True(Directory.Exists(secondRunStore.
CurrentWorkingDirectory
));
801
incompatibleRunDirectory = incompatibleRunStore.
CurrentWorkingDirectory
;
842
futureRunDirectory = futureRunStore.
CurrentWorkingDirectory
;
886
incompatibleRunDirectory = incompatibleRunStore.
CurrentWorkingDirectory
;
908
var runsDirectory = Path.GetDirectoryName(currentRunStore.
CurrentWorkingDirectory
)!;
979
historicalRunDirectories.Add(historicalRunStore.
CurrentWorkingDirectory
);
986
var runsDirectory = Path.GetDirectoryName(currentRunStore.
CurrentWorkingDirectory
)!;
990
Assert.True(Directory.Exists(currentRunStore.
CurrentWorkingDirectory
));
1014
Assert.True(File.Exists(DashboardRunStore.GetRunLockPath(runStore.
CurrentWorkingDirectory
)));
1132
var runsDirectory = Path.GetDirectoryName(currentRunStore.
CurrentWorkingDirectory
)!;
1133
Assert.True(Directory.Exists(activeRunStore.
CurrentWorkingDirectory
));
1149
historicalRunDirectory = historicalRunStore.
CurrentWorkingDirectory
;
1280
historicalRunDirectories.Add(historicalRunStore.
CurrentWorkingDirectory
);
1303
Assert.True(Directory.Exists(currentRunStore.
CurrentWorkingDirectory
));