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