2 writes to _state
Microsoft.CodeAnalysis.Features (2)
GenerateType\AbstractGenerateTypeService.Editor.cs (2)
55
_state
= state;
74
_state
= state;
47 references to _state
Microsoft.CodeAnalysis.Features (47)
GenerateType\AbstractGenerateTypeService.Editor.cs (14)
100
var documentName = GetTypeName(
_state
) + _service.DefaultFileExtension;
165
var namespaceToGenerateInto =
_state
.NamespaceToGenerateInOpt.Trim();
181
var namespaceToGenerateInto =
_state
.NamespaceToGenerateInOpt.Trim();
308
:
_state
.SimpleName !=
_state
.NameOrMemberAccessExpression
363
updatedSolution, modifiedRoot: null, _semanticDocument.Document,
_state
.SimpleName,
389
_state
.SimpleName.SpanStart, _cancellationToken);
395
new CodeGenerationContext(afterThisLocation: _semanticDocument.SyntaxTree.GetLocation(
_state
.SimpleName.Span))),
455
_state
.SimpleName,
485
else if (!_service.IsSimpleName(
_state
.NameOrMemberAccessExpression))
554
new CodeGenerationContext(contextLocation:
_state
.SimpleName.GetLocation())),
555
_state
.TypeToGenerateInOpt,
590
if (
_state
.BaseTypeOrInterfaceOpt != null)
593
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);
256
if (
_state
.IsException)
270
=> _service.GetAccessibility(
_state
, _semanticDocument.SemanticModel, _intoNamespace, _cancellationToken);
277
if (
_state
.BaseTypeOrInterfaceOpt == null ||
_state
.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface)
282
return RemoveUnavailableTypeParameters(
_state
.BaseTypeOrInterfaceOpt);
287
if (
_state
.BaseTypeOrInterfaceOpt != null &&
_state
.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface)
289
var type = RemoveUnavailableTypeParameters(
_state
.BaseTypeOrInterfaceOpt);
306
=> GetTypeName(
_state
);
309
=> _service.GetTypeParameters(
_state
, _semanticDocument.SemanticModel, _cancellationToken);
313
return
_state
.IsStruct
315
:
_state
.IsInterface
322
var availableInnerTypeParameters = _service.GetTypeParameters(
_state
, _semanticDocument.SemanticModel, _cancellationToken);
323
var availableOuterTypeParameters = !_intoNamespace &&
_state
.TypeToGenerateInOpt != null
324
?
_state
.TypeToGenerateInOpt.GetAllTypeParameters()