49 references to GetTypeDisplayName
Microsoft.AspNetCore.Http.Extensions (27)
RequestDelegateFactory.cs (11)
715
throw new NotSupportedException($"The by reference parameter '{attribute} {TypeNameHelper.
GetTypeDisplayName
(parameter.ParameterType, fullName: false)} {parameter.Name}' is not supported.");
1299
var parameterTypeName = TypeNameHelper.
GetTypeDisplayName
(factoryContext.JsonRequestBodyParameter.ParameterType, fullName: false);
1434
var parameterTypeName = TypeNameHelper.
GetTypeDisplayName
(factoryContext.FirstFormRequestBodyParameter.ParameterType, fullName: false);
1568
throw new InvalidOperationException($"The nullable type '{TypeNameHelper.
GetTypeDisplayName
(parameter.ParameterType, fullName: false)}' is not supported, mark the parameter as non-nullable.");
1671
var parameterTypeNameConstant = Expression.Constant(TypeNameHelper.
GetTypeDisplayName
(parameter.ParameterType, fullName: false));
1687
var typeName = TypeNameHelper.
GetTypeDisplayName
(targetParseType, fullName: false);
1898
var parameterTypeNameConstant = Expression.Constant(TypeNameHelper.
GetTypeDisplayName
(parameter.ParameterType, fullName: false));
2000
var typeName = TypeNameHelper.
GetTypeDisplayName
(parameter.ParameterType, fullName: false);
2177
var parameterTypeNameConstant = Expression.Constant(TypeNameHelper.
GetTypeDisplayName
(parameter.ParameterType, fullName: false));
2337
Expression.Constant(TypeNameHelper.
GetTypeDisplayName
(parameter.ParameterType, fullName: false)),
2624
return new NotSupportedException($"Unsupported return type: {TypeNameHelper.
GetTypeDisplayName
(returnType)}");
src\Shared\ParameterBindingMethodCache.cs (14)
193
stringBuilder.AppendLine(CultureInfo.InvariantCulture, $"TryParse method found on {TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)} with incorrect format. Must be a static method with format");
194
stringBuilder.AppendLine(CultureInfo.InvariantCulture, $"bool TryParse(string, IFormatProvider, out {TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)})");
195
stringBuilder.AppendLine(CultureInfo.InvariantCulture, $"bool TryParse(string, out {TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)})");
287
stringBuilder.AppendLine(CultureInfo.InvariantCulture, $"BindAsync method found on {TypeNameHelper.
GetTypeDisplayName
(nonNullableParameterType, fullName: false)} with incorrect format. Must be a static method with format");
288
stringBuilder.AppendLine(CultureInfo.InvariantCulture, $"ValueTask<{TypeNameHelper.
GetTypeDisplayName
(nonNullableParameterType, fullName: false)}> BindAsync(HttpContext context, ParameterInfo parameter)");
289
stringBuilder.AppendLine(CultureInfo.InvariantCulture, $"ValueTask<{TypeNameHelper.
GetTypeDisplayName
(nonNullableParameterType, fullName: false)}> BindAsync(HttpContext context)");
290
stringBuilder.AppendLine(CultureInfo.InvariantCulture, $"ValueTask<{TypeNameHelper.
GetTypeDisplayName
(nonNullableParameterType, fullName: false)}?> BindAsync(HttpContext context, ParameterInfo parameter)");
291
stringBuilder.AppendLine(CultureInfo.InvariantCulture, $"ValueTask<{TypeNameHelper.
GetTypeDisplayName
(nonNullableParameterType, fullName: false)}?> BindAsync(HttpContext context)");
347
$"The public parameterized constructor must contain only parameters that match the declared public properties for type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}'.");
363
throw new InvalidOperationException($"The abstract type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}' is not supported.");
403
throw new InvalidOperationException($"Only a single public parameterized constructor is allowed for type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}'.");
406
throw new InvalidOperationException($"No public parameterless constructor found for type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}'.");
435
var typeName = TypeNameHelper.
GetTypeDisplayName
(type, fullName: true, nestedTypeDelimiter: '.');
466
throw new InvalidOperationException($"{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)} implements multiple interfaces defining a static {interfaceMethod} method causing ambiguity.");
src\Shared\PropertyAsParameterInfo.cs (1)
103
throw new InvalidOperationException($"The nullable type '{TypeNameHelper.
GetTypeDisplayName
(parameters[i].ParameterType, fullName: false)}' is not supported.");
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40
return item == null ? null :
GetTypeDisplayName
(item.GetType(), fullName);
Microsoft.AspNetCore.Http.Extensions.Tests (22)
ParameterBindingMethodCacheTests.cs (12)
558
Assert.StartsWith($"TryParse method found on {TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)} with incorrect format. Must be a static method with format", ex.Message);
559
Assert.Contains($"bool TryParse(string, IFormatProvider, out {TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)})", ex.Message);
560
Assert.Contains($"bool TryParse(string, out {TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)})", ex.Message);
620
Assert.StartsWith($"BindAsync method found on {TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)} with incorrect format. Must be a static method with format", ex.Message);
621
Assert.Contains($"ValueTask<{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}> BindAsync(HttpContext context, ParameterInfo parameter)", ex.Message);
622
Assert.Contains($"ValueTask<{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}> BindAsync(HttpContext context)", ex.Message);
623
Assert.Contains($"ValueTask<{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}?> BindAsync(HttpContext context, ParameterInfo parameter)", ex.Message);
624
Assert.Contains($"ValueTask<{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}?> BindAsync(HttpContext context)", ex.Message);
684
Assert.Equal($"No public parameterless constructor found for type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}'.", ex.Message);
694
Assert.Equal($"The abstract type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}' is not supported.", ex.Message);
704
Assert.Equal($"Only a single public parameterized constructor is allowed for type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}'.", ex.Message);
717
$"The public parameterized constructor must contain only parameters that match the declared public properties for type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}'.",
RequestDelegateFactoryTests.cs (5)
993
=> $"Only a single public parameterized constructor is allowed for type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}'.";
996
=> $"The abstract type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}' is not supported.";
999
=> $"No public parameterless constructor found for type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}'.";
1002
=> $"The public parameterized constructor must contain only parameters that match the declared public properties for type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}'.";
2114
Assert.Contains($"The nullable type '{TypeNameHelper.
GetTypeDisplayName
(parameter.ParameterType, fullName: false)}' is not supported, mark the parameter as non-nullable.", exception.Message);
RequestDelegateGenerator\CompileTimeCreationTests.AsParameters.cs (5)
42
=> $"The abstract type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}' is not supported. For more information, please see https://aka.ms/aspnet/rdg-known-issues";
45
=> $"Only a single public parameterized constructor is allowed for type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}'. For more information, please see https://aka.ms/aspnet/rdg-known-issues";
48
=> $"No public parameterless constructor found for type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}'. For more information, please see https://aka.ms/aspnet/rdg-known-issues";
51
=> $"The public parameterized constructor must contain only parameters that match the declared public properties for type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}'. For more information, please see https://aka.ms/aspnet/rdg-known-issues";
54
=> $"The enumerable type '{TypeNameHelper.
GetTypeDisplayName
(type, fullName: false)}' is not supported. For more information, please see https://aka.ms/aspnet/rdg-known-issues";