18 references to MissingParameterValueException
Aspire.Hosting (4)
ApplicationModel\ParameterResource.cs (1)
517
return new
MissingParameterValueException
($"Parameter resource '{Name}' requires a value.");
Orchestrator\ParameterProcessor.cs (1)
585
await parameterResource.SetExceptionAsync(new
MissingParameterValueException
("Parameter value has been deleted."), cancellationToken).ConfigureAwait(false);
ParameterResourceBuilderExtensions.cs (2)
325
?? throw new
MissingParameterValueException
($"Parameter resource could not be used because configuration key '{configurationKey}' is missing and the Parameter has no default value.");
361
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)
1252
var dependentParam = new ParameterResource("dependent-param", p => throw new
MissingParameterValueException
("Should be prompted"), secret: false);
1297
var portParam = new ParameterResource("app-port", p => throw new
MissingParameterValueException
("Should be prompted"), secret: false);
Aspire.Hosting.OpenAI (1)
OpenAIExtensions.cs (1)
35
throw new
MissingParameterValueException
($"OpenAI API key parameter '{name}-openai-apikey' is missing and OPENAI_API_KEY environment variable is not set.");
Aspire.Hosting.Tests (11)
AddParameterTests.cs (2)
155
var parameter = new ParameterResource("optional", _ => throw new
MissingParameterValueException
("Parameter 'optional' is missing."), secret: false)
176
var parameter = new ParameterResource("test", _ => throw new
MissingParameterValueException
("Parameter 'test' is missing."), secret: false);
Orchestrator\ParameterProcessorTests.cs (9)
170
Assert.True(parameter.TrySetException(new
MissingParameterValueException
("Missing parameter value.")));
893
var missingParam = builder.AddParameter("missingParam", () => throw new
MissingParameterValueException
("Parameter 'missingParam' is missing"));
1766
return new ParameterResource(name, _ => configuration[$"Parameters:{name}"] ?? throw new
MissingParameterValueException
($"Parameter '{name}' is missing"), secret);
1782
return new ParameterResource(name, _ => throw new
MissingParameterValueException
($"Parameter '{name}' is missing"), secret: secret);
1812
parameterDefault => configuration["Parameters:generatedParam"] ?? parameterDefault?.GetDefaultValue() ?? throw new
MissingParameterValueException
("Parameter 'generatedParam' is missing"),
1842
_ => throw new
MissingParameterValueException
("Connection string 'mydb' is missing"),
1883
_ => throw new
MissingParameterValueException
("Parameter 'myparam' is missing"),
1924
_ => throw new
MissingParameterValueException
("Parameter 'customparam' is missing"),
2235
configuration[configurationKey] ?? throw new
MissingParameterValueException
("Parameter is missing."))