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