15 references to Parsability
Microsoft.AspNetCore.App.Analyzers (15)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
396
return ParsabilityHelper.GetParsability(typeSymbol, wellKnownTypes) ==
Parsability
.Parsable;
RouteHandlers\DisallowNonParsableComplexTypesOnParameters.cs (4)
70
var
parsability = ParsabilityHelper.GetParsability(parameterTypeSymbol, wellKnownTypes);
72
if (parsability !=
Parsability
.Parsable)
100
var
parsability = ParsabilityHelper.GetParsability(parameterTypeSymbol, wellKnownTypes);
101
if (parameter.HasAttributeImplementingInterface(fromMetadataInterfaceTypeSymbol) && parsability !=
Parsability
.Parsable)
src\Shared\RoslynUtils\ParsabilityHelper.cs (10)
21
private static readonly BoundedCacheWithFactory<ITypeSymbol, (
Parsability
, ParsabilityMethod?)> ParsabilityCache = new();
50
internal static
Parsability
GetParsability(ITypeSymbol typeSymbol, WellKnownTypes wellKnownTypes)
55
internal static
Parsability
GetParsability(ITypeSymbol typeSymbol, WellKnownTypes wellKnownTypes, [NotNullWhen(false)] out ParsabilityMethod? parsabilityMethod)
57
var
parsability =
Parsability
.NotParsable;
64
return (
Parsability
.Parsable, parsabilityMethod);
70
return (
Parsability
.Parsable, ParsabilityMethod.IParsable);
80
return (
Parsability
.Parsable, ParsabilityMethod.TryParseWithFormatProvider);
85
return (
Parsability
.Parsable, ParsabilityMethod.TryParse);
88
return (
Parsability
.NotParsable, null);