70 writes to Path
aspire (5)
Configuration\ConfigSourceService.cs (5)
180
Path
= GetConfigSourcePath(explicitSource),
333
Path
= GetConfigSourcePath(explicitSource: true),
420
Path
= source.Path,
615
Path
= source.Path,
723
Path
= source.Path,
Aspire.Cli.Tests (65)
Backchannel\AppHostConnectionResolverTests.cs (1)
33
Path
= "aspire.config.json",
Commands\AgentInitCommandTests.cs (1)
382
new ConfigSource { Repository = "https://git.example/configuration",
Path
= "aspire.config.json", AppliedVersion = "version-1" },
Commands\ConfigSourceCommandTests.cs (12)
31
Path
= "aspire.config.json",
46
Path
= AspireConfigFile.FileName,
103
Path
= AspireConfigFile.FileName,
364
Path
= customSelection ? "teams/platform.json" : AspireConfigFile.FileName,
494
Path
= s_source.Path,
678
new ConfigSource { Repository = "https://parent.example/configuration",
Path
= "parent.json", AppliedVersion = "parent-version" },
832
Path
= s_source.Path,
941
var selectedSource = new ConfigSource { Repository = s_source.Repository,
Path
= "selected.json", AppliedVersion = s_source.AppliedVersion };
1028
var selectedSource = new ConfigSource { Repository = s_source.Repository,
Path
= "selected.json", AppliedVersion = s_source.AppliedVersion };
1071
Path
= "selected.json",
1278
Path
= "solution.json",
1468
Path
= AspireConfigFile.FileName,
Commands\NewCommandLocalTemplateTests.InitConfig.cs (1)
146
Path
= AspireConfigFile.FileName,
Commands\NewCommandLocalTemplateTests.SourceListGit.cs (1)
315
var source = new ConfigSource { Repository = repository.FullName,
Path
= "teams/platform.json", Ref = "config-preview" };
Configuration\ConfigSourceServiceGitTests.cs (17)
51
var source = new ConfigSource { Repository = workspace.Path,
Path
= AspireConfigFile.FileName };
94
var source = new ConfigSource { Repository = workspace.Path,
Path
= AspireConfigFile.FileName };
148
var source = new ConfigSource { Repository = workspace.Path,
Path
= AspireConfigFile.FileName };
178
Path
= source.Path,
389
var source = new ConfigSource { Repository = workspace.Path,
Path
= path };
413
var source = new ConfigSource { Repository = repository.FullName,
Path
= path };
441
var source = new ConfigSource { Repository = workspace.Path,
Path
= AspireConfigFile.FileName };
475
new() { Repository = workspace.Path,
Path
= AspireConfigFile.FileName },
506
new() { Repository = workspace.Path,
Path
= AspireConfigFile.FileName }, workspace.CreateDirectory("cache").FullName, TestContext.Current.CancellationToken));
516
new() { Repository = workspace.Path,
Path
= AspireConfigFile.FileName }, workspace.CreateDirectory("cache").FullName, TestContext.Current.CancellationToken));
537
new() { Repository = workspace.Path,
Path
= AspireConfigFile.FileName, Ref = reference },
555
new() { Repository = workspace.Path,
Path
= AspireConfigFile.FileName, Ref = expectedCommit },
567
var source = new ConfigSource { Repository = workspace.Path,
Path
= AspireConfigFile.FileName };
587
var pinned = await client.CheckAsync(new() { Repository = source.Repository,
Path
= source.Path, Ref = original.Commit },
613
new() { Repository = workspace.Path,
Path
= AspireConfigFile.FileName, Ref = reference },
636
var source = new ConfigSource { Repository = workspace.Path,
Path
= AspireConfigFile.FileName };
670
Path
= AspireConfigFile.FileName,
Configuration\ConfigSourceServiceTests.cs (30)
165
Path
= AspireConfigFile.FileName
236
Path
= "ignored-parent.json",
302
Path
= difference == "path" ? "other.json" : s_appliedSource.Path,
306
var ignoredSource = new ConfigSource { Repository = s_appliedSource.Repository,
Path
= "ignored.json", AppliedVersion = "ignored-version" };
396
Path
= "global.json",
405
Path
= $"{directory.Name}.json",
478
Path
= s_appliedSource.Path,
641
Path
= "teams/platform.json"
646
Path
= s_source.Path,
717
Path
= path,
732
new ConfigSource { Repository = repository,
Path
= s_source.Path }.Validate();
741
new ConfigSource { Repository = repository.FullName,
Path
= s_source.Path }.Validate();
760
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = repository,
Path
= s_source.Path }.Validate());
769
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = repository,
Path
= s_source.Path }.Validate());
783
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = s_source.Repository,
Path
= path }.Validate());
795
new ConfigSource { Repository = s_source.Repository,
Path
= s_source.Path, Ref = reference }.Validate();
814
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = s_source.Repository,
Path
= s_source.Path, Ref = reference }.Validate()).Message);
827
var expected = new ConfigSource { Repository = s_source.Repository,
Path
= path ?? AspireConfigFile.FileName, Ref = "preview" };
861
Assert.Equivalent(detected ? new ConfigSource { Repository = ConfigSourceService.MicrosoftRepository,
Path
= AspireConfigFile.FileName } : null,
1095
Assert.Equivalent(accepted ? new ConfigSource { Repository = ConfigSourceService.MicrosoftRepository,
Path
= AspireConfigFile.FileName } : new ConfigSource { OptOut = true },
1604
Path
= s_appliedSource.Path,
1644
new ConfigSource { Repository = s_source.Repository,
Path
= s_source.Path, AppliedVersion = "version-2" },
1730
var source = new ConfigSource { Repository = repository,
Path
= AspireConfigFile.FileName };
1799
Path
= s_appliedSource.Path,
1913
Path
= s_appliedSource.Path,
2054
var invalid = new ConfigSource { Repository = repository,
Path
= s_source.Path, Ref = gitRef, AppliedVersion = "version-1" };
2232
service.GetCacheDirectory(new() { Repository = s_source.Repository,
Path
= "other.json" }));
2234
service.GetCacheDirectory(new() { Repository = s_source.Repository,
Path
= s_source.Path, Ref = "preview" }));
2236
service.GetCacheDirectory(new() { Repository = s_source.Repository,
Path
= s_source.Path, Ref = "preview" }),
2237
service.GetCacheDirectory(new() { Repository = s_source.Repository,
Path
= s_source.Path, Ref = "main" }));
TestServices\TestConfigSourceServices.cs (2)
55
Path
= source.Path,
122
Path
= path,
48 references to Path
aspire (15)
Configuration\ConfigSource.cs (7)
46
&& first.
Path
== second.
Path
51
if (string.IsNullOrWhiteSpace(Repository) || string.IsNullOrWhiteSpace(
Path
))
60
if (
Path
.Contains('\\') ||
Path
.Contains(':')
61
||
Path
.Any(char.IsControl)
62
||
Path
.Split('/').Any(p => p is "" or "." or ".."))
Configuration\ConfigSourceService.cs (8)
229
if (source.
Path
!= AspireConfigFile.FileName)
231
details.Add((ConfigSourceStrings.ConfigurationFile, source.
Path
));
420
Path = source.
Path
,
579
var key = XxHash3.HashToUInt64(Encoding.UTF8.GetBytes($"{source.Repository}\n{source.
Path
}\n{source.Ref ?? ""}")).ToString("x16", CultureInfo.InvariantCulture);
590
var key = new ConfigSourceIdentity(source.Repository, source.
Path
, source.Ref);
615
Path = source.
Path
,
723
Path = source.
Path
,
839
var entry = await client.GetFileAsync(repositoryDirectory, commit, source.
Path
, GitCommandMode.Interactive, cancellationToken);
Aspire.Cli.Tests (33)
Commands\ConfigSourceCommandTests.cs (3)
494
Path = s_source.
Path
,
832
Path = s_source.
Path
,
863
{"configSource:repository":"{{s_source.Repository}}","configSource:path":"{{s_source.
Path
}}","configSource:appliedVersion":"{{s_source.AppliedVersion}}","custom":"keep"}
Commands\NewCommandLocalTemplateTests.SourceList.cs (1)
402
Assert.Equal(AspireConfigFile.FileName, source.
Path
);
Commands\NewCommandLocalTemplateTests.SourceListGit.cs (3)
303
[CliConfigNames.InitSourcePath] = source.
Path
,
321
await GitTestHelper.RunGitAsync(repository.FullName, outputHelper, "add", "--", source.
Path
);
330
var version = await runner.RunAsync(repository, ["rev-parse", $"{source.Ref}:{source.
Path
}"], GitCommandMode.Captured, TestContext.Current.CancellationToken);
Configuration\ConfigSourceServiceGitTests.cs (3)
178
Path = source.
Path
,
423
Assert.Equal(path, config.ConfigSource.
Path
);
587
var pinned = await client.CheckAsync(new() { Repository = source.Repository, Path = source.
Path
, Ref = original.Commit },
Configuration\ConfigSourceServiceTests.cs (22)
53
Assert.Equal(path ?? AspireConfigFile.FileName, source.
Path
);
302
Path = difference == "path" ? "other.json" : s_appliedSource.
Path
,
417
operations.Enqueue(source.
Path
);
418
if (source.
Path
== "global.json")
478
Path = s_appliedSource.
Path
,
646
Path = s_source.
Path
,
664
"path": "{{s_source.
Path
}}",
732
new ConfigSource { Repository = repository, Path = s_source.
Path
}.Validate();
741
new ConfigSource { Repository = repository.FullName, Path = s_source.
Path
}.Validate();
760
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = repository, Path = s_source.
Path
}.Validate());
769
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = repository, Path = s_source.
Path
}.Validate());
795
new ConfigSource { Repository = s_source.Repository, Path = s_source.
Path
, Ref = reference }.Validate();
814
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = s_source.Repository, Path = s_source.
Path
, Ref = reference }.Validate()).Message);
1604
Path = s_appliedSource.
Path
,
1644
new ConfigSource { Repository = s_source.Repository, Path = s_source.
Path
, AppliedVersion = "version-2" },
1799
Path = s_appliedSource.
Path
,
1913
Path = s_appliedSource.
Path
,
2035
[CliConfigNames.InitSourcePath] = s_source.
Path
,
2054
var invalid = new ConfigSource { Repository = repository, Path = s_source.
Path
, Ref = gitRef, AppliedVersion = "version-1" };
2234
service.GetCacheDirectory(new() { Repository = s_source.Repository, Path = s_source.
Path
, Ref = "preview" }));
2236
service.GetCacheDirectory(new() { Repository = s_source.Repository, Path = s_source.
Path
, Ref = "preview" }),
2237
service.GetCacheDirectory(new() { Repository = s_source.Repository, Path = s_source.
Path
, Ref = "main" }));
TestServices\TestConfigSourceServices.cs (1)
55
Path = source.
Path
,