10 references to HasAttribute
Microsoft.AspNetCore.Mvc.Analyzers (4)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (1)
79type.HasAttribute(pageAttributeModel, inherit: true);
src\Shared\Roslyn\MvcFacts.cs (2)
43if (type.HasAttribute(nonControllerAttribute, inherit: true)) 49!type.HasAttribute(controllerAttribute, inherit: true))
TopLevelParameterNameAnalyzer.cs (1)
57if (method.ContainingType.HasAttribute(symbolCache.IApiBehaviorMetadata, inherit: true))
Mvc.Analyzers.Test (6)
CodeAnalysisExtensionsTest.cs (6)
479var classHasAttribute = CodeAnalysisExtensions.HasAttribute(testClass, attribute, inherit: false); 507var hasAttribute = CodeAnalysisExtensions.HasAttribute(testClass, attribute, inherit: false); 533var hasAttributeWithoutInherit = CodeAnalysisExtensions.HasAttribute(testClass, attribute, inherit: false); 534var hasAttributeWithInherit = CodeAnalysisExtensions.HasAttribute(testClass, attribute, inherit: true); 564var hasAttribute = CodeAnalysisExtensions.HasAttribute(testClass, @interface, inherit: true); 565var hasAttributeOnDerived = CodeAnalysisExtensions.HasAttribute(testClass, @interface, inherit: true);