1 write to TypeToGenerateIn
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
407TypeToGenerateIn = definition as INamedTypeSymbol;
34 references to TypeToGenerateIn
Microsoft.CodeAnalysis.CodeStyle.Fixes (34)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (34)
113Contract.ThrowIfNull(TypeToGenerateIn); 114if (!CodeGenerator.CanAdd(_document.Project.Solution, TypeToGenerateIn, cancellationToken)) 126IsContainedInUnsafeType = _service.ContainingTypesOrSelfHasUnsafeKeyword(TypeToGenerateIn); 133Contract.ThrowIfNull(TypeToGenerateIn); 134var typeParametersNames = TypeToGenerateIn.GetAllTypeParameters().Select(t => t.Name).ToImmutableArray(); 139_document, this.TypeToGenerateIn, _arguments, ParameterTypes, parameterNames, cancellationToken).ConfigureAwait(false); 150Contract.ThrowIfNull(TypeToGenerateIn); 183_document, this.TypeToGenerateIn, remainingArguments, remainingParameterTypes, remainingParameterNames, cancellationToken).ConfigureAwait(false); 193Contract.ThrowIfNull(TypeToGenerateIn); 194Contract.ThrowIfNull(TypeToGenerateIn.BaseType); 200var result = FindConstructorToDelegateTo(parameters, expressions, TypeToGenerateIn.InstanceConstructors, cancellationToken) ?? 201FindConstructorToDelegateTo(parameters, expressions, TypeToGenerateIn.BaseType.InstanceConstructors, cancellationToken); 215Contract.ThrowIfNull(TypeToGenerateIn); 228if (TypeToGenerateIn.Equals(constructor.ContainingType) && 249Contract.ThrowIfNull(TypeToGenerateIn); 251var syntaxFacts = GetRequiredLanguageService<ISyntaxFactsService>(TypeToGenerateIn.Language); 252return TypeToGenerateIn.InstanceConstructors.Any(static (c, arg) => arg.self.Matches(c, arg.syntaxFacts), (self: this, syntaxFacts)); 286var allTypeParameters = TypeToGenerateIn.GetAllTypeParameters(); 409return TypeToGenerateIn?.TypeKind is (TypeKind?)TypeKind.Class or (TypeKind?)TypeKind.Struct; 434Contract.ThrowIfNull(TypeToGenerateIn); 437var isThis = _delegatedConstructor.ContainingType.OriginalDefinition.Equals(TypeToGenerateIn.OriginalDefinition); 438var delegatingArguments = this.GetRequiredLanguageService<SyntaxGenerator>(TypeToGenerateIn.Language).CreateArguments(_delegatedConstructor.Parameters); 447typeName: TypeToGenerateIn.Name, 459TypeToGenerateIn, 467Contract.ThrowIfNull(TypeToGenerateIn); 476: GetRequiredLanguageService<SyntaxGenerator>(TypeToGenerateIn.Language).CreateAssignmentStatements( 477GetRequiredLanguageService<SyntaxGeneratorInternal>(TypeToGenerateIn.Language), 489Contract.ThrowIfNull(TypeToGenerateIn); 502TypeToGenerateIn, 503GetRequiredLanguageService<SyntaxGenerator>(TypeToGenerateIn.Language).CreateMemberDelegatingConstructor( 504GetRequiredLanguageService<SyntaxGeneratorInternal>(TypeToGenerateIn.Language), 506TypeToGenerateIn.Name, 507TypeToGenerateIn, 509TypeToGenerateIn.IsAbstractClass() ? Accessibility.Protected : Accessibility.Public,