60 writes to Path
aspire (4)
Configuration\ConfigSourceService.cs (4)
167
Path
= explicitSource
249
Path
= source.Path,
448
Path
= source.Path,
540
Path
= source.Path,
Aspire.Cli.Tests (56)
Backchannel\AppHostConnectionResolverTests.cs (1)
30
Path
= "aspire.config.json",
Commands\AgentInitCommandTests.cs (1)
265
new ConfigSource { Repository = "https://git.example/configuration",
Path
= "aspire.config.json", AppliedVersion = "version-1" },
Commands\ConfigSourceCommandTests.cs (7)
30
Path
= "aspire.config.json",
306
Path
= s_source.Path,
489
new ConfigSource { Repository = "https://parent.example/configuration",
Path
= "parent.json", AppliedVersion = "parent-version" },
570
var selectedSource = new ConfigSource { Repository = s_source.Repository,
Path
= "selected.json", AppliedVersion = s_source.AppliedVersion };
657
var selectedSource = new ConfigSource { Repository = s_source.Repository,
Path
= "selected.json", AppliedVersion = s_source.AppliedVersion };
700
Path
= "selected.json",
902
Path
= "solution.json",
Configuration\ConfigSourceServiceGitTests.cs (18)
49
var source = new ConfigSource { Repository = workspace.Path,
Path
= AspireConfigFile.FileName };
90
var source = new ConfigSource { Repository = workspace.Path,
Path
= AspireConfigFile.FileName };
143
var source = new ConfigSource { Repository = workspace.Path,
Path
= AspireConfigFile.FileName };
173
Path
= source.Path,
384
var source = new ConfigSource { Repository = workspace.Path,
Path
= path };
408
var source = new ConfigSource { Repository = repository.FullName,
Path
= path };
436
var source = new ConfigSource { Repository = workspace.Path,
Path
= AspireConfigFile.FileName };
468
new() { Repository = workspace.Path,
Path
= AspireConfigFile.FileName },
499
new() { Repository = workspace.Path,
Path
= AspireConfigFile.FileName }, workspace.CreateDirectory("cache").FullName, TestContext.Current.CancellationToken));
509
new() { Repository = workspace.Path,
Path
= AspireConfigFile.FileName }, workspace.CreateDirectory("cache").FullName, TestContext.Current.CancellationToken));
523
var source = new ConfigSource { Repository = workspace.Path,
Path
= AspireConfigFile.FileName };
554
new() { Repository = workspace.Path,
Path
= AspireConfigFile.FileName, Ref = reference },
572
new() { Repository = workspace.Path,
Path
= AspireConfigFile.FileName, Ref = expectedCommit },
584
var source = new ConfigSource { Repository = workspace.Path,
Path
= AspireConfigFile.FileName };
604
var pinned = await client.CheckAsync(new() { Repository = source.Repository,
Path
= source.Path, Ref = original.Commit },
630
new() { Repository = workspace.Path,
Path
= AspireConfigFile.FileName, Ref = reference },
651
new() { Repository = workspace.Path,
Path
= AspireConfigFile.FileName }, workspace.CreateDirectory("cache").FullName, TestContext.Current.CancellationToken));
674
Path
= AspireConfigFile.FileName,
Configuration\ConfigSourceServiceTests.cs (27)
49
Path
= "ignored-parent.json",
140
Path
= difference == "path" ? "other.json" : s_appliedSource.Path,
144
var ignoredSource = new ConfigSource { Repository = s_appliedSource.Repository,
Path
= "ignored.json", AppliedVersion = "ignored-version" };
257
Path
= $"{directory.Name}.json",
342
Path
= s_appliedSource.Path,
505
Path
= "teams/platform.json"
510
Path
= s_source.Path,
581
Path
= path,
596
new ConfigSource { Repository = repository,
Path
= s_source.Path }.Validate();
605
new ConfigSource { Repository = repository.FullName,
Path
= s_source.Path }.Validate();
624
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = repository,
Path
= s_source.Path }.Validate());
633
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = repository,
Path
= s_source.Path }.Validate());
647
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = s_source.Repository,
Path
= path }.Validate());
659
new ConfigSource { Repository = s_source.Repository,
Path
= s_source.Path, Ref = reference }.Validate();
678
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = s_source.Repository,
Path
= s_source.Path, Ref = reference }.Validate()).Message);
689
var expected = new ConfigSource { Repository = s_source.Repository,
Path
= s_source.Path, Ref = "preview" };
723
Assert.Equivalent(detected ? new ConfigSource { Repository = ConfigSourceService.MicrosoftRepository,
Path
= AspireConfigFile.FileName } : null,
785
Assert.Equivalent(accepted ? new ConfigSource { Repository = ConfigSourceService.MicrosoftRepository,
Path
= AspireConfigFile.FileName } : null,
1044
Path
= s_appliedSource.Path,
1084
new ConfigSource { Repository = s_source.Repository,
Path
= s_source.Path, AppliedVersion = "version-2" },
1184
Path
= s_appliedSource.Path,
1298
Path
= s_appliedSource.Path,
1439
var invalid = new ConfigSource { Repository = repository,
Path
= s_source.Path, Ref = gitRef, AppliedVersion = "version-1" };
1585
service.GetCacheDirectory(new() { Repository = s_source.Repository,
Path
= "other.json" }));
1587
service.GetCacheDirectory(new() { Repository = s_source.Repository,
Path
= s_source.Path, Ref = "preview" }));
1589
service.GetCacheDirectory(new() { Repository = s_source.Repository,
Path
= s_source.Path, Ref = "preview" }),
1590
service.GetCacheDirectory(new() { Repository = s_source.Repository,
Path
= s_source.Path, Ref = "main" }));
TestServices\TestConfigSourceServices.cs (2)
58
Path
= source.Path,
119
Path
= path,
45 references to Path
aspire (17)
Configuration\ConfigSource.cs (7)
40
&& first.
Path
== second.
Path
45
if (string.IsNullOrWhiteSpace(Repository) || string.IsNullOrWhiteSpace(
Path
))
76
if (
Path
.Contains('\\') ||
Path
.Contains(':')
77
||
Path
.Any(char.IsControl)
78
||
Path
.Split('/').Any(p => p is "" or "." or ".."))
Configuration\ConfigSourceService.cs (10)
174
source.Repository, source.
Path
, source.Ref ?? ConfigSourceStrings.DefaultBranch,
249
Path = source.
Path
,
277
source.Repository, source.
Path
, snapshot.Metadata.Commit,
319
var identity = new ConfigSourceIdentity(source.Repository, source.
Path
, source.Ref);
330
foreach (var group in sources.GroupBy(source => new ConfigSourceIdentity(source.Repository, source.
Path
, source.Ref)))
417
var key = XxHash3.HashToUInt64(Encoding.UTF8.GetBytes($"{source.Repository}\n{source.
Path
}\n{source.Ref ?? ""}")).ToString("x16", CultureInfo.InvariantCulture);
424
var key = new ConfigSourceIdentity(source.Repository, source.
Path
, source.Ref);
448
Path = source.
Path
,
540
Path = source.
Path
,
656
var entry = await git.GetFileAsync(repositoryDirectory, commit, source.
Path
, GitCommandMode.Interactive, cancellationToken);
Aspire.Cli.Tests (28)
Commands\ConfigSourceCommandTests.cs (1)
306
Path = s_source.
Path
,
Configuration\ConfigSourceServiceGitTests.cs (3)
173
Path = source.
Path
,
418
Assert.Equal(path, config.ConfigSource.
Path
);
604
var pinned = await client.CheckAsync(new() { Repository = source.Repository, Path = source.
Path
, Ref = original.Commit },
Configuration\ConfigSourceServiceTests.cs (23)
140
Path = difference == "path" ? "other.json" : s_appliedSource.
Path
,
269
operations.Enqueue(source.
Path
);
270
if (source.
Path
== "global.json")
342
Path = s_appliedSource.
Path
,
510
Path = s_source.
Path
,
528
"path": "{{s_source.
Path
}}",
596
new ConfigSource { Repository = repository, Path = s_source.
Path
}.Validate();
605
new ConfigSource { Repository = repository.FullName, Path = s_source.
Path
}.Validate();
624
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = repository, Path = s_source.
Path
}.Validate());
633
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = repository, Path = s_source.
Path
}.Validate());
659
new ConfigSource { Repository = s_source.Repository, Path = s_source.
Path
, Ref = reference }.Validate();
678
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = s_source.Repository, Path = s_source.
Path
, Ref = reference }.Validate()).Message);
689
var expected = new ConfigSource { Repository = s_source.Repository, Path = s_source.
Path
, Ref = "preview" };
694
[CliConfigNames.InitSourcePath] = s_source.
Path
,
1044
Path = s_appliedSource.
Path
,
1084
new ConfigSource { Repository = s_source.Repository, Path = s_source.
Path
, AppliedVersion = "version-2" },
1184
Path = s_appliedSource.
Path
,
1298
Path = s_appliedSource.
Path
,
1420
[CliConfigNames.InitSourcePath] = s_source.
Path
,
1439
var invalid = new ConfigSource { Repository = repository, Path = s_source.
Path
, Ref = gitRef, AppliedVersion = "version-1" };
1587
service.GetCacheDirectory(new() { Repository = s_source.Repository, Path = s_source.
Path
, Ref = "preview" }));
1589
service.GetCacheDirectory(new() { Repository = s_source.Repository, Path = s_source.
Path
, Ref = "preview" }),
1590
service.GetCacheDirectory(new() { Repository = s_source.Repository, Path = s_source.
Path
, Ref = "main" }));
TestServices\TestConfigSourceServices.cs (1)
58
Path = source.
Path
,