8 references to HasAttribute
Microsoft.CodeAnalysis.CodeStyle (8)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (4)
175
if (symbol.
HasAttribute
(threadStaticAttribute))
182
if (!symbol.IsStatic && symbol.ContainingType.
HasAttribute
(inlineArrayAttribute))
193
return symbol.
HasAttribute
(dataMemberAttribute)
194
&& symbol.ContainingType.
HasAttribute
(dataContractAttribute);
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
478
if (namedType.
HasAttribute
(_structLayoutAttributeType))
489
var isInlineArray = namedType.
HasAttribute
(_inlineArrayAttributeType);
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
307
if (!containingType.
HasAttribute
(interpolatedStringHandlerAttributeType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IMethodSymbolExtensions.cs (1)
123
method.ReturnType.
HasAttribute
(compilation.AsyncMethodBuilderAttribute());