12 references to TryGetContainingDeclaration
Roslyn.Diagnostics.Analyzers (12)
AbstractApplyTraitToClass`1.cs (3)
42
if (syntaxGenerator.
TryGetContainingDeclaration
(attribute, DeclarationKind.Method) is null)
75
if (syntaxGenerator.
TryGetContainingDeclaration
(state.AttributeSyntax, DeclarationKind.Attribute) is not { } attribute)
80
if (syntaxGenerator.
TryGetContainingDeclaration
(attribute, DeclarationKind.Method) is not { } method)
ExportedPartsShouldHaveImportingConstructorCodeFixProvider.cs (3)
104
var declaration = generator.
TryGetContainingDeclaration
(exportAttribute, DeclarationKind.Class);
147
var declaration = generator.
TryGetContainingDeclaration
(importingConstructorAttribute, DeclarationKind.Constructor);
166
var declaration = generator.
TryGetContainingDeclaration
(constructor, DeclarationKind.Constructor);
ImportingConstructorShouldBeObsoleteCodeFixProvider.cs (5)
101
var declaration = generator.
TryGetContainingDeclaration
(constructor, DeclarationKind.Constructor);
128
var declaration = generator.
TryGetContainingDeclaration
(obsoleteAttributeApplication, DeclarationKind.Attribute);
149
var declaration = generator.
TryGetContainingDeclaration
(obsoleteAttributeApplication, DeclarationKind.Attribute);
173
var declaration = generator.
TryGetContainingDeclaration
(obsoleteAttributeApplication, DeclarationKind.Attribute);
192
var declaration = generator.
TryGetContainingDeclaration
(obsoleteAttributeApplication, DeclarationKind.Attribute);
TestExportsShouldNotBeDiscoverableCodeFixProvider.cs (1)
58
var declaration = generator.
TryGetContainingDeclaration
(exportingAttribute, DeclarationKind.Class);