2 writes to _state
Microsoft.CodeAnalysis.Features (2)
GenerateType\AbstractGenerateTypeService.Editor.cs (2)
57
_state
= state;
78
_state
= state;
47 references to _state
Microsoft.CodeAnalysis.Features (47)
GenerateType\AbstractGenerateTypeService.Editor.cs (14)
105
var documentName = GetTypeName(
_state
) + _service.DefaultFileExtension;
170
var namespaceToGenerateInto =
_state
.NamespaceToGenerateInOpt.Trim();
186
var namespaceToGenerateInto =
_state
.NamespaceToGenerateInOpt.Trim();
314
:
_state
.SimpleName !=
_state
.NameOrMemberAccessExpression
369
updatedSolution, modifiedRoot: null, _semanticDocument.Document,
_state
.SimpleName,
395
_state
.SimpleName.SpanStart, _cancellationToken);
401
new CodeGenerationContext(afterThisLocation: _semanticDocument.SyntaxTree.GetLocation(
_state
.SimpleName.Span)),
463
_state
.SimpleName,
496
else if (!_service.IsSimpleName(
_state
.NameOrMemberAccessExpression))
565
new CodeGenerationContext(contextLocation:
_state
.SimpleName.GetLocation()),
567
_state
.TypeToGenerateInOpt,
602
if (
_state
.BaseTypeOrInterfaceOpt != null)
605
var members = from t in
_state
.BaseTypeOrInterfaceOpt.GetBaseTypesAndThis()
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (33)
70
if (
_state
.DelegateMethodSymbol == null ||
71
_state
.DelegateMethodSymbol.ReturnType == null ||
72
_state
.DelegateMethodSymbol.ReturnType is IErrorTypeSymbol)
75
return
_state
.Compilation.GetSpecialType(SpecialType.System_Void);
79
return
_state
.DelegateMethodSymbol.ReturnType;
85
if (
_state
.DelegateMethodSymbol != null)
87
return
_state
.DelegateMethodSymbol.TypeParameters;
96
if (
_state
.DelegateMethodSymbol != null)
98
return
_state
.DelegateMethodSymbol.Parameters;
109
if (
_state
.IsException)
118
if (!_service.TryGetArgumentList(
_state
.ObjectCreationExpressionOpt, out var argumentList))
128
if (
_state
.IsException &&
129
_state
.BaseTypeOrInterfaceOpt.InstanceConstructors.Any(
137
if (
_state
.BaseTypeOrInterfaceOpt != null)
139
if (
_state
.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface || argumentList.Count == 0)
155
var delegatedConstructor =
_state
.BaseTypeOrInterfaceOpt.InstanceConstructors.FirstOrDefault(
176
foreach (var property in
_state
.PropertiesToGenerate)
190
var availableTypeParameters = _service.GetAvailableTypeParameters(
_state
, _semanticDocument.SemanticModel, _intoNamespace, _cancellationToken);
255
if (
_state
.IsException)
269
=> _service.GetAccessibility(
_state
, _semanticDocument.SemanticModel, _intoNamespace, _cancellationToken);
276
if (
_state
.BaseTypeOrInterfaceOpt == null ||
_state
.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface)
281
return RemoveUnavailableTypeParameters(
_state
.BaseTypeOrInterfaceOpt);
286
if (
_state
.BaseTypeOrInterfaceOpt != null &&
_state
.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface)
288
var type = RemoveUnavailableTypeParameters(
_state
.BaseTypeOrInterfaceOpt);
305
=> GetTypeName(
_state
);
308
=> _service.GetTypeParameters(
_state
, _semanticDocument.SemanticModel, _cancellationToken);
312
return
_state
.IsStruct
314
:
_state
.IsInterface
321
var availableInnerTypeParameters = _service.GetTypeParameters(
_state
, _semanticDocument.SemanticModel, _cancellationToken);
322
var availableOuterTypeParameters = !_intoNamespace &&
_state
.TypeToGenerateInOpt != null
323
?
_state
.TypeToGenerateInOpt.GetAllTypeParameters()