20 instantiations of TemplateSourceConfigurationException
aspire (19)
Configuration\ConfigSourceService.cs (1)
356
throw new
TemplateSourceConfigurationException
(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourcesMustBeObject);
Templating\ConfiguredTemplateSourceService.cs (1)
49
throw new
TemplateSourceConfigurationException
($"{AspireConfigFile.TemplateSourcesSectionName}.{name}", NewCommandStrings.InvalidConfiguredTemplateSource);
Templating\TemplateSourceConfiguration.cs (13)
34
throw new
TemplateSourceConfigurationException
(settingPath, NewCommandStrings.InvalidConfiguredTemplateSource);
55
_ => throw new
TemplateSourceConfigurationException
($"{settingPath}.{property.Name}", NewCommandStrings.TemplateSourceDisplayNameInvalid)
84
throw new
TemplateSourceConfigurationException
($"{settingPath}.displayName", NewCommandStrings.TemplateSourceDisplayNameInvalid);
107
throw new
TemplateSourceConfigurationException
(settingPath, NewCommandStrings.TemplateSourceMissingLocation);
123
throw new
TemplateSourceConfigurationException
(settingPath, NewCommandStrings.TemplateSourceStringRequired);
133
throw new
TemplateSourceConfigurationException
(settingPath, NewCommandStrings.TemplateSourceStringRequired);
141
throw new
TemplateSourceConfigurationException
(settingPath, NewCommandStrings.TemplateSourceInvalidRepository);
149
throw new
TemplateSourceConfigurationException
(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourceNameRequired);
161
throw new
TemplateSourceConfigurationException
(settingPath, NewCommandStrings.TemplateRepositoryPathInvalid);
198
throw new
TemplateSourceConfigurationException
(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourcesMustBeObject);
203
throw new
TemplateSourceConfigurationException
(key.Replace(':', '.'), NewCommandStrings.TemplateSourceUnknownField);
207
throw new
TemplateSourceConfigurationException
(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourcesMustBeObject);
213
throw new
TemplateSourceConfigurationException
($"{AspireConfigFile.TemplateSourcesSectionName}.{parts[1]}",
Templating\TemplateSourceStore.cs (4)
47
throw new
TemplateSourceConfigurationException
($"{AspireConfigFile.TemplateSourcesSectionName}.{name}", NewCommandStrings.TemplateSourceAlreadyExists);
82
throw new
TemplateSourceConfigurationException
(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourceLegacyConfiguration);
93
?? throw new
TemplateSourceConfigurationException
(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourcesMustBeObject);
106
?? throw new
TemplateSourceConfigurationException
(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourcesMustBeObject);
Aspire.Cli.Tests (1)
Commands\TemplateSourceStartupTests.cs (1)
209
Assert.Equal(new
TemplateSourceConfigurationException
(
22 references to TemplateSourceConfigurationException
aspire (4)
Commands\ConfigCommand.cs (1)
197
catch (
TemplateSourceConfigurationException
ex)
Commands\TemplateManagementCommand.cs (3)
102
catch (
TemplateSourceConfigurationException
ex)
188
catch (
TemplateSourceConfigurationException
ex)
224
catch (
TemplateSourceConfigurationException
ex)
Aspire.Cli.Tests (18)
Commands\NewCommandLocalTemplateTests.ConfiguredGitSourceObjects.cs (2)
150
var
error = await Assert.ThrowsAsync<
TemplateSourceConfigurationException
>(() =>
Commands\NewCommandLocalTemplateTests.ConfiguredSources.cs (2)
172
Assert.True(error is JsonException or
TemplateSourceConfigurationException
, error?.ToString());
206
await Assert.ThrowsAsync<
TemplateSourceConfigurationException
>(() =>
Commands\NewCommandLocalTemplateTests.SourceManagement.cs (1)
199
Assert.Throws<
TemplateSourceConfigurationException
>(() => TemplateManagementCommand.AddSourceOptions.FromParseResult(result));
Commands\TemplateSourceStartupTests.cs (2)
203
var
error = await Assert.ThrowsAsync<
TemplateSourceConfigurationException
>(() => args[^1] switch
Configuration\ConfigSourceServiceTests.cs (5)
173
[InlineData("""{"templateSources":null}""", typeof(Aspire.Cli.Templating.
TemplateSourceConfigurationException
))]
174
[InlineData("""{"templateSources":{".invalid":{"repository":"https://git.example/templates"}}}""", typeof(Aspire.Cli.Templating.
TemplateSourceConfigurationException
))]
175
[InlineData("""{"templateSources":{"enterprise":{}}}""", typeof(Aspire.Cli.Templating.
TemplateSourceConfigurationException
))]
176
[InlineData("""{"templateSources":{"enterprise":{"path":"relative"}}}""", typeof(Aspire.Cli.Templating.
TemplateSourceConfigurationException
))]
178
[InlineData("""{"templateSources":{"enterprise":{"repository":"https://git.example/templates","displayName":"Team\nTemplates"}}}""", typeof(Aspire.Cli.Templating.
TemplateSourceConfigurationException
))]
Configuration\SourceNameValidatorTests.cs (1)
64
Assert.Throws<
TemplateSourceConfigurationException
>(() => TemplateSourceConfiguration.ValidateName(name));
Templating\TemplateSourceConfigurationTests.cs (5)
25
Assert.Throws<
TemplateSourceConfigurationException
>(() =>
72
var
exception = Assert.Throws<
TemplateSourceConfigurationException
>(() =>
87
Assert.Throws<
TemplateSourceConfigurationException
>(() =>
139
Assert.Throws<
TemplateSourceConfigurationException
>(() => TemplateSourceConfiguration.ValidateName(name));