70 writes to Repository
aspire (5)
Configuration\ConfigSourceService.cs (5)
179
Repository
= repository!,
332
Repository
= repository,
419
Repository
= source.Repository,
614
Repository
= source.Repository,
722
Repository
= source.Repository,
Aspire.Cli.Tests (65)
Backchannel\AppHostConnectionResolverTests.cs (1)
32
Repository
= "https://git.example/configuration",
Commands\AgentInitCommandTests.cs (1)
382
new ConfigSource {
Repository
= "https://git.example/configuration", Path = "aspire.config.json", AppliedVersion = "version-1" },
Commands\ConfigSourceCommandTests.cs (12)
30
Repository
= "https://git.example/configuration",
45
Repository
= Path.Combine(workspace.Path, "missing-repository"),
102
Repository
= Path.Combine(workspace.Path, "missing-repository"),
363
Repository
= "https://git.example/saved-configuration",
493
Repository
= s_source.Repository,
678
new ConfigSource {
Repository
= "https://parent.example/configuration", Path = "parent.json", AppliedVersion = "parent-version" },
831
Repository
= employeeSource ? ConfigSourceService.MicrosoftRepository : s_source.Repository,
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 };
1070
Repository
= "https://selected.example/configuration",
1277
Repository
= "https://solution.example/configuration",
1467
Repository
= ConfigSourceService.MicrosoftRepository,
Commands\NewCommandLocalTemplateTests.InitConfig.cs (1)
145
Repository
= "https://git.example/configuration",
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 };
177
Repository
= source.Repository,
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 };
669
Repository
= workspace.Path,
Configuration\ConfigSourceServiceTests.cs (30)
164
Repository
= repository,
235
Repository
= s_appliedSource.Repository,
301
Repository
= difference == "repository" ? "https://other.example/config" : s_appliedSource.Repository,
306
var ignoredSource = new ConfigSource {
Repository
= s_appliedSource.Repository, Path = "ignored.json", AppliedVersion = "ignored-version" };
395
Repository
= s_appliedSource.Repository,
404
Repository
= s_appliedSource.Repository,
477
Repository
= s_appliedSource.Repository,
640
Repository
= "https://git.example/organization/config",
645
Repository
= s_source.Repository,
716
Repository
= repository,
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 },
1603
Repository
= s_appliedSource.Repository,
1644
new ConfigSource {
Repository
= s_source.Repository, Path = s_source.Path, AppliedVersion = "version-2" },
1730
var source = new ConfigSource {
Repository
= repository, Path = AspireConfigFile.FileName };
1798
Repository
= s_appliedSource.Repository,
1912
Repository
= s_appliedSource.Repository,
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)
54
Repository
= source.Repository,
121
Repository
= state.Repository,
69 references to Repository
aspire (14)
Configuration\ConfigSource.cs (4)
45
&& first.
Repository
== second.
Repository
51
if (string.IsNullOrWhiteSpace(
Repository
) || string.IsNullOrWhiteSpace(Path))
55
if (!GitHelpers.IsValidRepository(
Repository
))
Configuration\ConfigSourceService.cs (10)
227
(SharedCommandStrings.SourceGitRepository, source.
Repository
)
244
?? (source.
Repository
== MicrosoftRepository ? MicrosoftReadmeUrl : null);
419
Repository = source.
Repository
,
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);
614
Repository = source.
Repository
,
619
PackageSourceRedactor.RedactForDisplay(identity.
Repository
),
722
Repository = source.
Repository
,
821
resolvedCommit = await client.ResolveReferenceAsync(source.
Repository
, source.GetGitRef(), workingDirectory, mode, cancellationToken);
836
await client.FetchAsync(repositoryDirectory, source.
Repository
, source.GetGitRef(),
Aspire.Cli.Tests (55)
Commands\ConfigSourceCommandTests.cs (12)
84
Assert.Contains(source.
Repository
, diagnostic.Text);
126
Assert.Contains(source.
Repository
, diagnostic.Text);
389
SharedCommandStrings.GitFetchConfigurationSource, source.
Repository
)}[/]",
493
Repository = s_source.
Repository
,
808
[CliConfigNames.InitSourceUrl] = s_source.
Repository
831
Repository = employeeSource ? ConfigSourceService.MicrosoftRepository : s_source.
Repository
,
863
{"configSource:repository":"{{s_source.
Repository
}}","configSource:path":"{{s_source.Path}}","configSource:appliedVersion":"{{s_source.AppliedVersion}}","custom":"keep"}
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 };
1458
[CliConfigNames.InitSourceUrl] = microsoftDefault ? null : s_source.
Repository
,
1514
[CliConfigNames.InitSourceUrl] = s_source.
Repository
,
1573
[CliConfigNames.InitSourceUrl] = s_source.
Repository
Commands\NewCommandLocalTemplateTests.InitConfig.cs (1)
47
Assert.Equal(ConfigSourceService.MicrosoftRepository, source.
Repository
);
Commands\NewCommandLocalTemplateTests.SourceList.cs (2)
216
Assert.Equal("https://git.example/configuration", source.
Repository
);
401
Assert.Equal(ConfigSourceService.MicrosoftRepository, source.
Repository
);
Commands\NewCommandLocalTemplateTests.SourceListGit.cs (5)
80
Directory.Move(source.
Repository
, source.
Repository
+ "-unavailable");
133
Assert.Equal(source.
Repository
, resolution.Arguments[2]);
138
Assert.Equal(source.
Repository
, fetch.Arguments[^2]);
302
[CliConfigNames.InitSourceUrl] = source.
Repository
,
Configuration\ConfigSourceServiceGitTests.cs (3)
177
Repository = source.
Repository
,
422
Assert.Equal(repository.FullName, config.ConfigSource!.
Repository
);
587
var pinned = await client.CheckAsync(new() { Repository = source.
Repository
, Path = source.Path, Ref = original.Commit },
Configuration\ConfigSourceServiceTests.cs (31)
52
Assert.Equal("https://git.example/configuration", source.
Repository
);
150
Assert.Equal(repository, source.
Repository
);
235
Repository = s_appliedSource.
Repository
,
301
Repository = difference == "repository" ? "https://other.example/config" : s_appliedSource.
Repository
,
306
var ignoredSource = new ConfigSource { Repository = s_appliedSource.
Repository
, Path = "ignored.json", AppliedVersion = "ignored-version" };
395
Repository = s_appliedSource.
Repository
,
404
Repository = s_appliedSource.
Repository
,
477
Repository = s_appliedSource.
Repository
,
645
Repository = s_source.
Repository
,
663
"repository": "{{s_source.
Repository
}}",
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" };
831
[CliConfigNames.InitSourceUrl] = s_source.
Repository
,
916
[CliConfigNames.InitSourceUrl] = microsoftDefault ? null : s_source.
Repository
,
976
[CliConfigNames.InitSourceUrl] = s_source.
Repository
,
1034
[CliConfigNames.InitSourceUrl] = s_source.
Repository
1048
SharedCommandStrings.GitFetchConfigurationSource, s_source.
Repository
)}[/]");
1159
{"configSource:repository":"{{s_source.
Repository
}}","configSource:path":"different.json","configSource:appliedVersion":"saved-version","custom":"keep"}
1286
[CliConfigNames.InitSourceUrl] = s_source.
Repository
1603
Repository = s_appliedSource.
Repository
,
1644
new ConfigSource { Repository = s_source.
Repository
, Path = s_source.Path, AppliedVersion = "version-2" },
1798
Repository = s_appliedSource.
Repository
,
1912
Repository = s_appliedSource.
Repository
,
2034
[CliConfigNames.InitSourceUrl] = s_source.
Repository
,
2121
SharedCommandStrings.GitFetchConfigurationSource, s_source.
Repository
)}[/]", message.Message);
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 (1)
54
Repository = source.
Repository
,