1 write to TypeToGenerateIn
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
403
TypeToGenerateIn
= definition as INamedTypeSymbol;
35 references to TypeToGenerateIn
Microsoft.CodeAnalysis.CodeStyle.Fixes (35)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (35)
117
Contract.ThrowIfNull(
TypeToGenerateIn
);
118
if (!CodeGenerator.CanAdd(_document.Project.Solution,
TypeToGenerateIn
, cancellationToken))
130
IsContainedInUnsafeType = _service.ContainingTypesOrSelfHasUnsafeKeyword(
TypeToGenerateIn
);
137
var typeParametersNames =
TypeToGenerateIn
.GetAllTypeParameters().Select(t => t.Name).ToImmutableArray();
189
Contract.ThrowIfNull(
TypeToGenerateIn
);
190
Contract.ThrowIfNull(
TypeToGenerateIn
.BaseType);
196
var result = FindConstructorToDelegateTo(parameters, expressions,
TypeToGenerateIn
.InstanceConstructors, cancellationToken) ??
197
FindConstructorToDelegateTo(parameters, expressions,
TypeToGenerateIn
.BaseType.InstanceConstructors, cancellationToken);
211
Contract.ThrowIfNull(
TypeToGenerateIn
);
224
if (
TypeToGenerateIn
.Equals(constructor.ContainingType) &&
245
Contract.ThrowIfNull(
TypeToGenerateIn
);
247
var syntaxFacts = GetRequiredLanguageService<ISyntaxFactsService>(
TypeToGenerateIn
.Language);
248
return
TypeToGenerateIn
.InstanceConstructors.Any(static (c, arg) => arg.self.Matches(c, arg.syntaxFacts), (self: this, syntaxFacts));
282
var allTypeParameters =
TypeToGenerateIn
.GetAllTypeParameters();
405
return
TypeToGenerateIn
?.TypeKind is (TypeKind?)TypeKind.Class or (TypeKind?)TypeKind.Struct;
467
var members = from t in
TypeToGenerateIn
.GetBaseTypesAndThis()
468
let ignoreAccessibility = t.Equals(
TypeToGenerateIn
)
528
Contract.ThrowIfNull(
TypeToGenerateIn
);
530
return
TypeToGenerateIn
.MemberNames.Concat(
531
from type in
TypeToGenerateIn
.GetBaseTypes()
585
Contract.ThrowIfNull(
TypeToGenerateIn
);
588
var isThis = _delegatedConstructor.ContainingType.OriginalDefinition.Equals(
TypeToGenerateIn
.OriginalDefinition);
589
var delegatingArguments = this.GetRequiredLanguageService<SyntaxGenerator>(
TypeToGenerateIn
.Language).CreateArguments(_delegatedConstructor.Parameters);
598
typeName:
TypeToGenerateIn
.Name,
610
TypeToGenerateIn
,
618
Contract.ThrowIfNull(
TypeToGenerateIn
);
627
: GetRequiredLanguageService<SyntaxGenerator>(
TypeToGenerateIn
.Language).CreateAssignmentStatements(
628
GetRequiredLanguageService<SyntaxGeneratorInternal>(
TypeToGenerateIn
.Language),
640
Contract.ThrowIfNull(
TypeToGenerateIn
);
653
TypeToGenerateIn
,
654
GetRequiredLanguageService<SyntaxGenerator>(
TypeToGenerateIn
.Language).CreateMemberDelegatingConstructor(
655
GetRequiredLanguageService<SyntaxGeneratorInternal>(
TypeToGenerateIn
.Language),
657
TypeToGenerateIn
.Name,
658
TypeToGenerateIn
,
660
TypeToGenerateIn
.IsAbstractClass() ? Accessibility.Protected : Accessibility.Public,