2 writes to ContainingType
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (2)
207
ContainingType
= semanticModel.GetEnclosingNamedType(IdentifierToken.SpanStart, cancellationToken);
263
ContainingType
= semanticModel.GetEnclosingNamedType(IdentifierToken.SpanStart, cancellationToken);
9 references to ContainingType
Microsoft.CodeAnalysis.CodeStyle.Fixes (9)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (3)
140
else if (state.
ContainingType
.IsContainedWithin(state.TypeToGenerateIn))
144
else if (DerivesFrom(state, state.
ContainingType
) && state.IsStatic)
164
else if (state.
ContainingType
.ContainingAssembly.IsSameAssemblyOrHasFriendAccessTo(state.TypeToGenerateIn.ContainingAssembly))
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (6)
208
if (
ContainingType
== null)
213
if (!
ContainingType
.Interfaces.OfType<INamedTypeSymbol>().Contains(TypeToGenerateIn))
264
if (
ContainingType
== null)
284
if (!TryDetermineTypeToGenerateIn(_document,
ContainingType
, SimpleNameOrMemberAccessExpressionOpt, cancellationToken,
380
symbol.ContainingType.Equals(
ContainingType
))
492
if (!
ContainingType
.OriginalDefinition.Equals(TypeToGenerateIn.OriginalDefinition))