3 writes to TypeToGenerateIn
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (3)
152
TypeToGenerateIn
= SymbolFinderInternal.FindSourceDefinition(
197
TypeToGenerateIn
= typeToGenerateIn;
290
TypeToGenerateIn
= typeToGenerateIn;
24 references to TypeToGenerateIn
Microsoft.CodeAnalysis.CodeStyle.Fixes (24)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (8)
88
context, _state.
TypeToGenerateIn
, propertySymbol, cancellationToken).ConfigureAwait(false);
102
context, _state.
TypeToGenerateIn
, fieldSymbol, cancellationToken).ConfigureAwait(false);
116
var syntaxFactory = _semanticDocument.Project.Solution.Services.GetLanguageServices(_state.
TypeToGenerateIn
.Language).GetService<SyntaxGenerator>();
121
return _state.
TypeToGenerateIn
.TypeKind != TypeKind.Interface && _refKind != RefKind.None
128
if (state.
TypeToGenerateIn
.TypeKind == TypeKind.Interface)
140
else if (state.ContainingType.IsContainedWithin(state.
TypeToGenerateIn
))
164
else if (state.ContainingType.ContainingAssembly.IsSameAssemblyOrHasFriendAccessTo(state.
TypeToGenerateIn
.ContainingAssembly))
178
.Contains(state.
TypeToGenerateIn
);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (4)
47
var canGenerateMember = CodeGenerator.CanAdd(document.Project.Solution, state.
TypeToGenerateIn
, cancellationToken);
95
if (state.
TypeToGenerateIn
.TypeKind == TypeKind.Interface && state.IsStatic)
105
var isOnlyReadAndIsInInterface = state.
TypeToGenerateIn
.TypeKind == TypeKind.Interface && !state.IsWrittenTo;
139
if (state.
TypeToGenerateIn
.TypeKind != TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (12)
85
if (this.
TypeToGenerateIn
.TypeKind == TypeKind.Interface)
91
var containingTypeAccessibility = this.
TypeToGenerateIn
.DetermineMinimalAccessibility();
138
var existingMembers =
TypeToGenerateIn
.GetMembers(IdentifierToken.ValueText)
153
TypeToGenerateIn
, _document.Project.Solution, cancellationToken) as INamedTypeSymbol;
155
if (!ValidateTypeToGenerateIn(
TypeToGenerateIn
, IsStatic, ClassInterfaceModuleStructTypes))
160
IsContainedInUnsafeType = _service.ContainingTypesOrSelfHasUnsafeKeyword(
TypeToGenerateIn
);
162
return CanGenerateLocal() || CodeGenerator.CanAdd(_document.Project.Solution,
TypeToGenerateIn
, cancellationToken);
167
return this.
TypeToGenerateIn
is { IsImplicitClass: false }
168
&&
TypeToGenerateIn
.GetMembers(WellKnownMemberNames.TopLevelStatementsEntryPointMethodName).IsEmpty;
213
if (!ContainingType.Interfaces.OfType<INamedTypeSymbol>().Contains(
TypeToGenerateIn
))
470
var availableTypeParameters =
TypeToGenerateIn
.GetAllTypeParameters();
492
if (!ContainingType.OriginalDefinition.Equals(
TypeToGenerateIn
.OriginalDefinition))