29 instantiations of TemplateSource
aspire (1)
Commands\NewCommand.cs (1)
548
return await CreateFromSourceAsync(new
TemplateSource
(templatePath ?? ".", templateRepository, templateRepositoryRef), configSource, parseResult, cancellationToken);
Aspire.Cli.Tests (28)
Commands\NewCommandLocalTemplateTests.cs (13)
1330
templateProvider.GetTemplatesAsync(new
TemplateSource
("template", null, null), new CancellationToken(canceled: true)));
1347
var templates = await provider.GetRequiredService<ITemplateProvider>().GetTemplatesAsync(new
TemplateSource
("template", null, null));
1561
new
TemplateSource
("template", "https://example.test/templates.git", null), cancellation.Token));
1592
var first = Assert.Single(await templates.GetTemplatesAsync(new
TemplateSource
("template", "-repository", "main")));
1601
Assert.Single(await templates.GetTemplatesAsync(new
TemplateSource
("./template", "-repository", "v1")));
1732
new
("one", "repository-a", "main"),
1733
new
("two", "repository-a", "main"),
1734
new
("one", "repository-b", "main"),
1735
new
("one", "repository-a", "changed")
1742
Assert.Single(await templates.GetTemplatesAsync(new
TemplateSource
("./one", "repository-a", "same-commit-tag")));
1749
templates.GetTemplatesAsync(new
TemplateSource
("missing", "repository-a", "main")));
1780
var source = new
TemplateSource
("template", "repository", "main");
1820
var source = new
TemplateSource
("template", "repository", "missing");
Commands\NewCommandLocalTemplateTests.NuGetValues.cs (1)
428
var templates = await provider.GetRequiredService<ITemplateProvider>().GetTemplatesAsync(new
TemplateSource
("template", null, null));
Templating\TemplateEngineFactoryGitCheckoutTests.cs (6)
29
new
TemplateSource
(".", Path.GetRelativePath(workspace.WorkspaceRoot.FullName, repository.FullName), commit),
49
Assert.Single(await factory.GetTemplatesAsync(new
TemplateSource
(".", repository.FullName, commit), TestContext.Current.CancellationToken));
67
Assert.Single(await factory.GetTemplatesAsync(new
TemplateSource
(".", repository.FullName, "same"), TestContext.Current.CancellationToken));
69
Assert.Single(await factory.GetTemplatesAsync(new
TemplateSource
(".", repository.FullName, "refs/tags/same"), TestContext.Current.CancellationToken));
84
new
TemplateSource
(".", Path.Combine(workspace.Path, "private-repository-secret-marker"), null), TestContext.Current.CancellationToken));
107
Assert.Single(await factory.GetTemplatesAsync(new
TemplateSource
(".", repository.FullName, commit), TestContext.Current.CancellationToken));
Templating\TemplateEngineFactoryGitTests.cs (8)
30
new
TemplateSource
(".", "-repository with spaces", commit), TestContext.Current.CancellationToken);
59
GetFactory(provider).GetTemplatesAsync(new
TemplateSource
(".", "repository", CommitSha), TestContext.Current.CancellationToken));
80
GetFactory(provider).GetTemplatesAsync(new
TemplateSource
(".", "repository", CommitSha), TestContext.Current.CancellationToken));
95
GetFactory(provider).GetTemplatesAsync(new
TemplateSource
(".", "repository", CommitSha), new CancellationToken(canceled: true)));
118
GetFactory(provider).GetTemplatesAsync(new
TemplateSource
(".", "repository", resolving ? null : CommitSha), cancellation.Token));
142
GetFactory(provider).GetTemplatesAsync(new
TemplateSource
(".", "repository", CommitSha), TestContext.Current.CancellationToken));
167
GetFactory(provider).GetTemplatesAsync(new
TemplateSource
(".", "repository", null), TestContext.Current.CancellationToken));
194
var templates = await GetFactory(provider).GetTemplatesAsync(new
TemplateSource
(".", "repository", null), TestContext.Current.CancellationToken);
12 references to TemplateSource
aspire (7)
Commands\NewCommand.cs (1)
647
private async Task<CommandResult> CreateFromSourceAsync(
TemplateSource
source, ConfigSource? configSource, ParseResult parseResult, CancellationToken cancellationToken)
Templating\CliTemplateFactory.cs (1)
115
public Task<IEnumerable<ITemplate>> GetTemplatesAsync(
TemplateSource
? source, CancellationToken cancellationToken = default)
Templating\DotNetTemplateFactory.cs (1)
66
public async Task<IEnumerable<ITemplate>> GetTemplatesAsync(
TemplateSource
? source, CancellationToken cancellationToken = default)
Templating\ITemplateFactory.cs (1)
19
Task<IEnumerable<ITemplate>> GetTemplatesAsync(
TemplateSource
? source, CancellationToken cancellationToken = default);
Templating\ITemplateProvider.cs (1)
24
Task<IEnumerable<ITemplate>> GetTemplatesAsync(
TemplateSource
? source, CancellationToken cancellationToken = default);
Templating\TemplateEngineFactory.cs (1)
48
public async Task<IEnumerable<ITemplate>> GetTemplatesAsync(
TemplateSource
? source, CancellationToken cancellationToken = default)
Templating\TemplateProvider.cs (1)
28
public async Task<IEnumerable<ITemplate>> GetTemplatesAsync(
TemplateSource
? source, CancellationToken cancellationToken = default)
Aspire.Cli.Tests (5)
Commands\NewCommandChannelResolutionTests.cs (1)
769
public Task<IEnumerable<ITemplate>> GetTemplatesAsync(
TemplateSource
? source, CancellationToken cancellationToken = default) =>
Commands\NewCommandLocalTemplateTests.cs (4)
1730
TemplateSource
[] sources =
1737
foreach (
var
source in sources)
1780
var
source = new TemplateSource("template", "repository", "main");
1820
var
source = new TemplateSource("template", "repository", "missing");