1 instantiation of WellKnownTypes
Microsoft.AspNetCore.App.Analyzers (1)
src\Shared\RoslynUtils\WellKnownTypes.cs (1)
18LazyWellKnownTypesCache.GetOrCreateValue(compilation, static c => new WellKnownTypes(c));
70 references to WellKnownTypes
Microsoft.AspNetCore.App.Analyzers (70)
Authorization\AddAuthorizationBuilderAnalyzer.cs (2)
30var wellKnownTypes = WellKnownTypes.GetOrCreate(context.Compilation);
Authorization\AuthorizationOptionsTypes.cs (1)
14public AuthorizationOptionsTypes(WellKnownTypes wellKnownTypes)
Http\HeaderDictionaryAddAnalyzer.cs (2)
28var wellKnownTypes = WellKnownTypes.GetOrCreate(context.Compilation);
Http\RequestDelegateReturnTypeAnalyzer.cs (2)
26var wellKnownTypes = WellKnownTypes.GetOrCreate(compilation);
Infrastructure\RouteUsageCache.cs (2)
56var wellKnownTypes = WellKnownTypes.GetOrCreate(_compilation);
Mvc\DetectAmbiguousActionRoutes.cs (6)
21private static void DetectAmbiguousActionRoutes(SymbolAnalysisContext context, WellKnownTypes wellKnownTypes, RoutePatternTree? controllerRoutePattern, List<ActionRoute> actionRoutes) 106private readonly WellKnownTypes _wellKnownTypes; 108public ActionRouteGroupKey(IMethodSymbol actionSymbol, RoutePatternTree routePattern, ImmutableArray<string> httpMethods, bool controllerHasActionToken, WellKnownTypes wellKnownTypes) 120private static string GetActionName(IMethodSymbol actionSymbol, WellKnownTypes wellKnownTypes) 148private static bool CanMatchActions(WellKnownTypes wellKnownTypes, IMethodSymbol actionSymbol1, IMethodSymbol actionSymbol2) 214private static bool HasUnknownAttribute(IMethodSymbol actionSymbol, WellKnownTypes wellKnownTypes)
Mvc\DetectOverriddenAuthorizeAttribute.cs (5)
26private static void DetectOverriddenAuthorizeAttributeOnController(SymbolAnalysisContext context, WellKnownTypes wellKnownTypes, 56private static void DetectOverriddenAuthorizeAttributeOnAction(SymbolAnalysisContext context, WellKnownTypes wellKnownTypes, 114private static bool IsInheritableAttribute(WellKnownTypes wellKnownTypes, INamedTypeSymbol attribute) 135private static bool IsMatchingAttribute(WellKnownTypes wellKnownTypes, INamedTypeSymbol attribute, 152private static void FindAuthorizeAndAllowAnonymous(WellKnownTypes wellKnownTypes, ISymbol symbol, bool isCheckingBaseType,
Mvc\MvcAnalyzer.cs (4)
37var wellKnownTypes = WellKnownTypes.GetOrCreate(compilation); 91private static void PopulateActionRoutes(SymbolAnalysisContext context, WellKnownTypes wellKnownTypes, RouteUsageCache routeUsageCache, List<ActionRoute> actionRoutes, IMethodSymbol methodSymbol) 119private static ImmutableArray<string> GetUnroutedMethodHttpMethods(WellKnownTypes wellKnownTypes, IMethodSymbol methodSymbol)
RenderTreeBuilder\RenderTreeBuilderAnalyzer.cs (3)
28var wellKnownTypes = WellKnownTypes.GetOrCreate(compilation); 59private static bool IsRenderTreeBuilderMethodWithSequenceParameter(WellKnownTypes wellKnownTypes, IMethodSymbol targetMethod)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (4)
130var wellKnownTypes = WellKnownTypes.GetOrCreate(semanticModel.Compilation); 356private static bool HasNonRouteAttribute(SyntaxToken token, SemanticModel semanticModel, WellKnownTypes wellKnownTypes, CancellationToken cancellationToken) 386private static bool IsCurrentParameterBindable(SyntaxToken token, SemanticModel semanticModel, WellKnownTypes wellKnownTypes, CancellationToken cancellationToken)
RouteEmbeddedLanguage\Infrastructure\MvcDetector.cs (2)
15public static bool IsController(INamedTypeSymbol? typeSymbol, WellKnownTypes wellKnownTypes) 28public static bool IsAction(IMethodSymbol methodSymbol, WellKnownTypes wellKnownTypes)
RouteEmbeddedLanguage\Infrastructure\RoutePatternParametersDetector.cs (5)
15public static ImmutableArray<ParameterSymbol> ResolvedParameters(ISymbol symbol, WellKnownTypes wellKnownTypes) 19static ImmutableArray<ParameterSymbol> ResolvedParametersCore(ISymbol symbol, ISymbol? topLevelSymbol, WellKnownTypes wellKnownTypes) 43static string ResolveRouteParameterName(ISymbol parameterSymbol, WellKnownTypes wellKnownTypes) 75private static bool HasSpecialType(ISymbol child, WellKnownTypes wellKnownTypes, WellKnownType[] specialTypes) 85private static bool HasExplicitNonRouteAttribute(ISymbol child, WellKnownTypes wellKnownTypes, WellKnownType[] allNoneRouteMetadataTypes)
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (5)
57public static RouteUsageContext BuildContext(RouteOptions routeOptions, SyntaxToken token, SemanticModel semanticModel, WellKnownTypes wellKnownTypes, CancellationToken cancellationToken) 154private static ImmutableArray<string> CalculateHttpMethods(WellKnownTypes wellKnownTypes, IMethodSymbol mapMethodSymbol) 212private static IMethodSymbol? FindMvcMethod(WellKnownTypes wellKnownTypes, IMethodSymbol? methodSymbol) 232public static MapMethodParts? FindMapMethodParts(SemanticModel semanticModel, WellKnownTypes wellKnownTypes, SyntaxNode container, CancellationToken cancellationToken) 260private static MapMethodParts? FindValidMapMethodParts(SemanticModel semanticModel, WellKnownTypes wellKnownTypes, BaseArgumentListSyntax argumentList, IMethodSymbol method)
RouteHandlers\AtMostOneFromBodyAttribute.cs (1)
19WellKnownTypes wellKnownTypes,
RouteHandlers\DetectAmbiguousRoutes.cs (3)
22private static void DetectAmbiguousRoutes(in OperationBlockAnalysisContext context, WellKnownTypes wellKnownTypes, ConcurrentDictionary<MapOperation, byte> mapOperations) 48private static IOperation? ResolveOperation(IOperation operation, WellKnownTypes wellKnownTypes) 93private static bool IsAllowedEndpointBuilderMethod(IInvocationOperation invocationOperation, WellKnownTypes wellKnownTypes)
RouteHandlers\DisallowMvcBindArgumentsOnParameters.cs (1)
18WellKnownTypes wellKnownTypes,
RouteHandlers\DisallowNonParsableComplexTypesOnParameters.cs (2)
20WellKnownTypes wellKnownTypes, 97static bool ReportFromAttributeDiagnostic(OperationAnalysisContext context, WellKnownType fromMetadataInterfaceType, WellKnownTypes wellKnownTypes, IParameterSymbol parameter, INamedTypeSymbol parameterTypeSymbol, Location location)
RouteHandlers\DisallowReturningActionResultFromMapMethods.cs (2)
18WellKnownTypes wellKnownTypes, 28WellKnownTypes wellKnownTypes,
RouteHandlers\RouteHandlerAnalyzer.cs (4)
42var wellKnownTypes = WellKnownTypes.GetOrCreate(compilation); 196WellKnownTypes wellKnownTypes, 206static bool IsCompatibleDelegateType(WellKnownTypes wellKnownTypes, IMethodSymbol targetMethod)
src\Shared\RoslynUtils\ParsabilityHelper.cs (10)
23private static bool IsTypeAlwaysParsable(ITypeSymbol typeSymbol, WellKnownTypes wellKnownTypes, [NotNullWhen(true)] out ParsabilityMethod? parsabilityMethod) 50internal static Parsability GetParsability(ITypeSymbol typeSymbol, WellKnownTypes wellKnownTypes) 55internal static Parsability GetParsability(ITypeSymbol typeSymbol, WellKnownTypes wellKnownTypes, [NotNullWhen(false)] out ParsabilityMethod? parsabilityMethod) 104private static bool IsTryParseWithFormat(IMethodSymbol methodSymbol, WellKnownTypes wellKnownTypes) 115internal static bool IsParsableViaIParsable(ITypeSymbol typeSymbol, WellKnownTypes wellKnownTypes) 124private static bool IsBindableViaIBindableFromHttpContext(ITypeSymbol typeSymbol, WellKnownTypes wellKnownTypes) 134private static bool IsBindAsync(IMethodSymbol methodSymbol, ITypeSymbol typeSymbol, WellKnownTypes wellKnownTypes) 145private static bool IsBindAsyncWithParameter(IMethodSymbol methodSymbol, ITypeSymbol typeSymbol, WellKnownTypes wellKnownTypes) 156private static bool IsReturningValueTaskOfTOrNullableT(INamedTypeSymbol returnType, ITypeSymbol containingType, WellKnownTypes wellKnownTypes) 162internal static Bindability GetBindability(ITypeSymbol typeSymbol, WellKnownTypes wellKnownTypes, out BindabilityMethod? bindabilityMethod, out IMethodSymbol? bindMethodSymbol)
src\Shared\RoslynUtils\WellKnownTypes.cs (2)
15private static readonly BoundedCacheWithFactory<Compilation, WellKnownTypes> LazyWellKnownTypesCache = new(); 17public static WellKnownTypes GetOrCreate(Compilation compilation) =>
WebApplicationBuilder\WebApplicationBuilderAnalyzer.cs (2)
39var wellKnownTypes = WellKnownTypes.GetOrCreate(compilation);