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