3 writes to CurrentWorkingDirectory
Aspire.Dashboard (3)
ServiceClient\DashboardRunStore.cs (3)
132
CurrentWorkingDirectory
= _temporaryDirectory;
140
CurrentWorkingDirectory
= Path.Combine(_runsDirectory, runId);
162
CurrentWorkingDirectory
= Path.Combine(resumesDirectory, _applicationMarkerFileName);
49 references to CurrentWorkingDirectory
Aspire.Dashboard (20)
ServiceClient\DashboardRunStore.cs (20)
133
DatabasePath = Path.Combine(
CurrentWorkingDirectory
, DatabaseFileName);
134
_runLock = OpenRunLock(
CurrentWorkingDirectory
);
141
DatabasePath = Path.Combine(
CurrentWorkingDirectory
, DatabaseFileName);
143
Directory.CreateDirectory(
CurrentWorkingDirectory
);
145
CurrentWorkingDirectory
,
149
File.WriteAllText(Path.Combine(
CurrentWorkingDirectory
, _applicationMarkerFileName), string.Empty);
157
_metadataPath = Path.Combine(
CurrentWorkingDirectory
, "run.json");
163
DatabasePath = Path.Combine(
CurrentWorkingDirectory
, DatabaseFileName);
164
DirectoryHelper.CreateWithOwnerOnlyPermissions(
CurrentWorkingDirectory
);
166
CurrentWorkingDirectory
,
212
CurrentWorkingDirectory
,
218
var temporaryRoot = Directory.GetParent(
CurrentWorkingDirectory
)!.FullName;
221
if (string.Equals(directory,
CurrentWorkingDirectory
, StringComparison.OrdinalIgnoreCase) ||
249
GetRunLockPath(
CurrentWorkingDirectory
));
371
DeleteUnheldLocks(_runsDirectory, "*.lock", GetRunLockPath(
CurrentWorkingDirectory
));
400
CreateDescriptor(_metadata,
CurrentWorkingDirectory
, isCurrent: true)
407
if (string.Equals(directory,
CurrentWorkingDirectory
, StringComparison.OrdinalIgnoreCase))
454
_runsDirectory ??
CurrentWorkingDirectory
,
473
else if (PersistenceMode == DashboardPersistenceMode.Run && Directory.Exists(
CurrentWorkingDirectory
))
477
_deleteRunDirectory(
CurrentWorkingDirectory
);
Aspire.Dashboard.Tests (29)
Model\DashboardDataSourceTests.cs (29)
41
Assert.Equal(expectedRunsDirectory, Directory.GetParent(runStore.
CurrentWorkingDirectory
)!.FullName);
42
Assert.True(File.Exists(Path.Combine(runStore.
CurrentWorkingDirectory
, applicationDirectoryName)));
56
Assert.Equal(Path.Combine(expectedResumesDirectory, applicationDirectoryName), runStore.
CurrentWorkingDirectory
);
120
Assert.Equal(runStore.RunId, Path.GetFileName(runStore.
CurrentWorkingDirectory
));
142
var metadataPath = Path.Combine(runStore.
CurrentWorkingDirectory
, "run.json");
176
using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(runStore.
CurrentWorkingDirectory
, "run.json")));
199
metadataPath = Path.Combine(historicalRunStore.
CurrentWorkingDirectory
, "run.json");
256
using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(currentRunStore.
CurrentWorkingDirectory
, "run.json")));
284
Assert.False(File.Exists(Path.Combine(runStore.
CurrentWorkingDirectory
, "run.json")));
310
$"Dashboard run store initialized with persistence mode 'Run'. Current working directory: '{runStore.
CurrentWorkingDirectory
}'. Database path: '{runStore.DatabasePath}'.",
317
$"Dashboard run discovery completed in directory '{Directory.GetParent(runStore.
CurrentWorkingDirectory
)!.FullName}'. Run count: 1. Run IDs: {runStore.RunId}.",
332
runDirectory = runStore.
CurrentWorkingDirectory
;
376
runDirectory = runStore.
CurrentWorkingDirectory
;
445
Assert.True(File.Exists(DashboardRunStore.GetRunLockPath(runStore.
CurrentWorkingDirectory
)));
498
Assert.True(Directory.Exists(activeRunStore.
CurrentWorkingDirectory
));
499
Assert.True(Directory.Exists(secondRunStore.
CurrentWorkingDirectory
));
754
incompatibleRunDirectory = incompatibleRunStore.
CurrentWorkingDirectory
;
795
futureRunDirectory = futureRunStore.
CurrentWorkingDirectory
;
839
incompatibleRunDirectory = incompatibleRunStore.
CurrentWorkingDirectory
;
861
var runsDirectory = Path.GetDirectoryName(currentRunStore.
CurrentWorkingDirectory
)!;
932
historicalRunDirectories.Add(historicalRunStore.
CurrentWorkingDirectory
);
939
var runsDirectory = Path.GetDirectoryName(currentRunStore.
CurrentWorkingDirectory
)!;
943
Assert.True(Directory.Exists(currentRunStore.
CurrentWorkingDirectory
));
967
Assert.True(File.Exists(DashboardRunStore.GetRunLockPath(runStore.
CurrentWorkingDirectory
)));
1085
var runsDirectory = Path.GetDirectoryName(currentRunStore.
CurrentWorkingDirectory
)!;
1086
Assert.True(Directory.Exists(activeRunStore.
CurrentWorkingDirectory
));
1102
historicalRunDirectory = historicalRunStore.
CurrentWorkingDirectory
;
1231
historicalRunDirectories.Add(historicalRunStore.
CurrentWorkingDirectory
);
1253
Assert.True(Directory.Exists(currentRunStore.
CurrentWorkingDirectory
));