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