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)
100var documentName = GetTypeName(_state) + _service.DefaultFileExtension; 165var namespaceToGenerateInto = _state.NamespaceToGenerateInOpt.Trim(); 181var namespaceToGenerateInto = _state.NamespaceToGenerateInOpt.Trim(); 308: _state.SimpleName != _state.NameOrMemberAccessExpression 363updatedSolution, modifiedRoot: null, _semanticDocument.Document, _state.SimpleName, 389_state.SimpleName.SpanStart, _cancellationToken); 395new CodeGenerationContext(afterThisLocation: _semanticDocument.SyntaxTree.GetLocation(_state.SimpleName.Span))), 455_state.SimpleName, 485else if (!_service.IsSimpleName(_state.NameOrMemberAccessExpression)) 554new CodeGenerationContext(contextLocation: _state.SimpleName.GetLocation())), 555_state.TypeToGenerateInOpt, 590if (_state.BaseTypeOrInterfaceOpt != null) 593var members = from t in _state.BaseTypeOrInterfaceOpt.GetBaseTypesAndThis()
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (33)
70if (_state.DelegateMethodSymbol == null || 71_state.DelegateMethodSymbol.ReturnType == null || 72_state.DelegateMethodSymbol.ReturnType is IErrorTypeSymbol) 75return _state.Compilation.GetSpecialType(SpecialType.System_Void); 79return _state.DelegateMethodSymbol.ReturnType; 85if (_state.DelegateMethodSymbol != null) 87return _state.DelegateMethodSymbol.TypeParameters; 96if (_state.DelegateMethodSymbol != null) 98return _state.DelegateMethodSymbol.Parameters; 109if (_state.IsException) 118if (!_service.TryGetArgumentList(_state.ObjectCreationExpressionOpt, out var argumentList)) 128if (_state.IsException && 129_state.BaseTypeOrInterfaceOpt.InstanceConstructors.Any( 137if (_state.BaseTypeOrInterfaceOpt != null) 139if (_state.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface || argumentList.Count == 0) 155var delegatedConstructor = _state.BaseTypeOrInterfaceOpt.InstanceConstructors.FirstOrDefault( 176foreach (var property in _state.PropertiesToGenerate) 190var availableTypeParameters = _service.GetAvailableTypeParameters(_state, _semanticDocument.SemanticModel, _intoNamespace, _cancellationToken); 256if (_state.IsException) 270=> _service.GetAccessibility(_state, _semanticDocument.SemanticModel, _intoNamespace, _cancellationToken); 277if (_state.BaseTypeOrInterfaceOpt == null || _state.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface) 282return RemoveUnavailableTypeParameters(_state.BaseTypeOrInterfaceOpt); 287if (_state.BaseTypeOrInterfaceOpt != null && _state.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface) 289var type = RemoveUnavailableTypeParameters(_state.BaseTypeOrInterfaceOpt); 306=> GetTypeName(_state); 309=> _service.GetTypeParameters(_state, _semanticDocument.SemanticModel, _cancellationToken); 313return _state.IsStruct 315: _state.IsInterface 322var availableInnerTypeParameters = _service.GetTypeParameters(_state, _semanticDocument.SemanticModel, _cancellationToken); 323var availableOuterTypeParameters = !_intoNamespace && _state.TypeToGenerateInOpt != null 324? _state.TypeToGenerateInOpt.GetAllTypeParameters()