10 references to ExceptionMessages
Microsoft.Extensions.Configuration.Binder.SourceGeneration (10)
ConfigurationBindingGenerator.Parser.cs (4)
683
initExceptionMessage = string.Format(Emitter.
ExceptionMessages
.MultipleParameterizedConstructors, typeSymbol.GetFullName());
695
initExceptionMessage = string.Format(Emitter.
ExceptionMessages
.MissingPublicInstanceConstructor, typeSymbol.GetFullName());
778
initExceptionMessage = string.Format(Emitter.
ExceptionMessages
.CannotBindToConstructorParameter, typeSymbol.GetFullName(), FormatParams(invalidParameters));
788
initExceptionMessage = string.Format(Emitter.
ExceptionMessages
.ConstructorParametersDoNotMatchProperties, typeSymbol.GetFullName(), FormatParams(missingParameters));
Emitter\CoreBindingHelpers.cs (6)
430
throw new {{Identifier.InvalidOperationException}}("{{string.Format(
ExceptionMessages
.ParameterHasNoMatchingConfig, type.FullName, member.Name)}}");
512
string exceptionMessage = string.Format(
ExceptionMessages
.MissingConfig, Identifier.ErrorOnUnknownConfiguration, Identifier.BinderOptions, $"{{{Identifier.type}}}", $@"{{string.Join("", "", {Identifier.temp})}}");
583
throw new NotSupportedException($"{{string.Format(
ExceptionMessages
.CannotSpecifyBindNonPublicProperties)}}");
593
string exceptionArg1 = string.Format(
ExceptionMessages
.FailedBinding, $"{{{Identifier.value} ?? \"null\"}}", $"{{{Identifier.path}}}", $"{{typeof(T)}}");
663
string exceptionArg1 = string.Format(
ExceptionMessages
.FailedBinding, $"{{{Identifier.value} ?? \"null\"}}", $"{{{Identifier.path}}}", $"{{typeof({typeFQN})}}");
1352
_writer.WriteLine(@$"throw new NotSupportedException($""{string.Format(
ExceptionMessages
.TypeNotDetectedAsInput, "{type}")}"");");