13 instantiations of MissingParameterValueException
Aspire.Hosting (2)
ParameterResourceBuilderExtensions.cs (2)
217
?? throw new
MissingParameterValueException
($"Parameter resource could not be used because configuration key '{configurationKey}' is missing and the Parameter has no default value.");
252
throw new
MissingParameterValueException
($"Connection string parameter resource could not be used because connection string '{name}' is missing."),
Aspire.Hosting.Azure.Tests (2)
AzureDeployerTests.cs (2)
822
var dependentParam = new ParameterResource("dependent-param", p => throw new
MissingParameterValueException
("Should be prompted"), secret: false);
867
var portParam = new ParameterResource("app-port", p => throw new
MissingParameterValueException
("Should be prompted"), secret: false);
Aspire.Hosting.GitHub.Models (1)
GitHubModelsExtensions.cs (1)
38
throw new
MissingParameterValueException
($"GitHub API key parameter '{name}-gh-apikey' is missing and GITHUB_TOKEN environment variable is not set.");
Aspire.Hosting.OpenAI (1)
OpenAIExtensions.cs (1)
34
throw new
MissingParameterValueException
($"OpenAI API key parameter '{name}-openai-apikey' is missing and OPENAI_API_KEY environment variable is not set.");
Aspire.Hosting.Tests (7)
Orchestrator\ParameterProcessorTests.cs (7)
630
var missingParam = builder.AddParameter("missingParam", () => throw new
MissingParameterValueException
("Parameter 'missingParam' is missing"));
810
return new ParameterResource(name, _ => configuration[$"Parameters:{name}"] ?? throw new
MissingParameterValueException
($"Parameter '{name}' is missing"), secret);
815
return new ParameterResource(name, _ => throw new
MissingParameterValueException
($"Parameter '{name}' is missing"), secret: secret);
845
parameterDefault => configuration["Parameters:generatedParam"] ?? parameterDefault?.GetDefaultValue() ?? throw new
MissingParameterValueException
("Parameter 'generatedParam' is missing"),
873
_ => throw new
MissingParameterValueException
("Connection string 'mydb' is missing"),
912
_ => throw new
MissingParameterValueException
("Parameter 'myparam' is missing"),
951
_ => throw new
MissingParameterValueException
("Parameter 'customparam' is missing"),
12 references to MissingParameterValueException
Aspire.Hosting (6)
MissingParameterValueException.cs (2)
20
/// Initializes a new instance of the <see cref="
MissingParameterValueException
"/> class with a specified error message.
28
/// Initializes a new instance of the <see cref="
MissingParameterValueException
"/> class with a specified error message
Orchestrator\ParameterProcessor.cs (3)
173
if (interactionService.IsAvailable && ex is
MissingParameterValueException
)
191
var stateText = ex is
MissingParameterValueException
?
197
var stateStyle = ex is
MissingParameterValueException
?
Publishing\ResourceContainerImageManager.cs (1)
505
catch (
MissingParameterValueException
)
Aspire.Hosting.Tests (6)
AddParameterTests.cs (1)
571
await Assert.ThrowsAsync<
MissingParameterValueException
>(async () =>
Orchestrator\ParameterProcessorTests.cs (1)
134
Assert.IsType<
MissingParameterValueException
>(parameterWithMissingValue.WaitForValueTcs.Task.Exception?.InnerException);
WithEnvironmentTests.cs (2)
169
var
innerException = Assert.IsType<
MissingParameterValueException
>(exception.InnerException);
WithReferenceTests.cs (2)
298
var
inner = Assert.IsType<
MissingParameterValueException
>(aggregate.InnerException);