3 writes to CurrentWorkingDirectory
Aspire.Dashboard (3)
ServiceClient\DashboardRunStore.cs (3)
131
CurrentWorkingDirectory
= _temporaryDirectory;
140
CurrentWorkingDirectory
= Path.Combine(_runsDirectory, runId);
157
CurrentWorkingDirectory
= Path.Combine(resumesDirectory, _applicationMarkerFileName);
49 references to CurrentWorkingDirectory
Aspire.Dashboard (18)
ServiceClient\DashboardRunStore.cs (18)
132
DatabasePath = Path.Combine(
CurrentWorkingDirectory
, DatabaseFileName);
133
_runLock = OpenRunLock(
CurrentWorkingDirectory
);
141
DatabasePath = Path.Combine(
CurrentWorkingDirectory
, DatabaseFileName);
144
File.WriteAllText(Path.Combine(
CurrentWorkingDirectory
, _applicationMarkerFileName), string.Empty);
152
_metadataPath = Path.Combine(
CurrentWorkingDirectory
, "run.json");
158
DatabasePath = Path.Combine(
CurrentWorkingDirectory
, DatabaseFileName);
159
DirectoryHelper.CreateWithOwnerOnlyPermissions(
CurrentWorkingDirectory
);
161
CurrentWorkingDirectory
,
207
CurrentWorkingDirectory
,
213
var temporaryRoot = Directory.GetParent(
CurrentWorkingDirectory
)!.FullName;
216
if (string.Equals(directory,
CurrentWorkingDirectory
, StringComparison.OrdinalIgnoreCase) ||
244
GetRunLockPath(
CurrentWorkingDirectory
));
366
DeleteUnheldLocks(_runsDirectory, "*.lock", GetRunLockPath(
CurrentWorkingDirectory
));
395
CreateDescriptor(_metadata,
CurrentWorkingDirectory
, isCurrent: true)
402
if (string.Equals(directory,
CurrentWorkingDirectory
, StringComparison.OrdinalIgnoreCase))
449
_runsDirectory ??
CurrentWorkingDirectory
,
468
else if (PersistenceMode == DashboardPersistenceMode.Run && Directory.Exists(
CurrentWorkingDirectory
))
472
_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")));
354
$"Dashboard run store initialized with persistence mode 'Run'. Current working directory: '{runStore.
CurrentWorkingDirectory
}'. Database path: '{runStore.DatabasePath}'.",
361
$"Dashboard run discovery completed in directory '{Directory.GetParent(runStore.
CurrentWorkingDirectory
)!.FullName}'. Run count: 1. Run IDs: {runStore.RunId}.",
376
runDirectory = runStore.
CurrentWorkingDirectory
;
420
runDirectory = runStore.
CurrentWorkingDirectory
;
489
Assert.True(File.Exists(DashboardRunStore.GetRunLockPath(runStore.
CurrentWorkingDirectory
)));
542
Assert.True(Directory.Exists(activeRunStore.
CurrentWorkingDirectory
));
543
Assert.True(Directory.Exists(secondRunStore.
CurrentWorkingDirectory
));
798
incompatibleRunDirectory = incompatibleRunStore.
CurrentWorkingDirectory
;
839
futureRunDirectory = futureRunStore.
CurrentWorkingDirectory
;
883
incompatibleRunDirectory = incompatibleRunStore.
CurrentWorkingDirectory
;
905
var runsDirectory = Path.GetDirectoryName(currentRunStore.
CurrentWorkingDirectory
)!;
976
historicalRunDirectories.Add(historicalRunStore.
CurrentWorkingDirectory
);
983
var runsDirectory = Path.GetDirectoryName(currentRunStore.
CurrentWorkingDirectory
)!;
987
Assert.True(Directory.Exists(currentRunStore.
CurrentWorkingDirectory
));
1011
Assert.True(File.Exists(DashboardRunStore.GetRunLockPath(runStore.
CurrentWorkingDirectory
)));
1129
var runsDirectory = Path.GetDirectoryName(currentRunStore.
CurrentWorkingDirectory
)!;
1130
Assert.True(Directory.Exists(activeRunStore.
CurrentWorkingDirectory
));
1146
historicalRunDirectory = historicalRunStore.
CurrentWorkingDirectory
;
1275
historicalRunDirectories.Add(historicalRunStore.
CurrentWorkingDirectory
);
1297
Assert.True(Directory.Exists(currentRunStore.
CurrentWorkingDirectory
));