143 references to State
Microsoft.VisualStudio.LanguageServices.Implementation (142)
CodeModel\AbstractCodeModelObject.cs (5)
58get { return this.State.CodeGenerator; } 63get { return this.State.CodeModelService; } 68get { return this.State.ServiceProvider; } 73get { return this.State.SyntaxFactsService; } 78get { return this.State.Workspace; }
CodeModel\CodeTypeRef.cs (5)
52if (CodeModelService.ResolveSymbol(this.State.Workspace, _projectId, _symbolId) is not ITypeSymbol typeSymbol) 72get { return (EnvDTE.CodeType)CodeModelService.CreateCodeType(this.State, _projectId, LookupTypeSymbol()); } 85return CodeTypeRef.Create(this.State, null, _projectId, arrayType); 95return CodeTypeRef.Create(this.State, this, _projectId, ((IArrayTypeSymbol)typeSymbol).ElementType); 99return CodeTypeRef.Create(this.State, this, _projectId, ((IPointerTypeSymbol)typeSymbol).PointedAtType);
CodeModel\Collections\AttributeArgumentCollection.cs (2)
50element = (EnvDTE.CodeElement)CodeAttributeArgument.Create(this.State, this.ParentAttribute, index); 68element = (EnvDTE.CodeElement)CodeAttributeArgument.Create(this.State, this.ParentAttribute, currentIndex);
CodeModel\Collections\AttributeCollection.cs (2)
52return (EnvDTE.CodeElement)CodeAttribute.Create(this.State, this.FileCodeModel, this.ParentElement, name, ordinal); 81element = (EnvDTE.CodeElement)CodeAttribute.Create(State, FileCodeModel, this.ParentElement, childName, ordinal);
CodeModel\Collections\BasesCollection.cs (2)
94element = CodeModelService.CreateCodeType(this.State, projectId, child); 120element = CodeModelService.CreateCodeType(this.State, projectId, child);
CodeModel\Collections\ExternalMemberCollection.cs (5)
47var project = this.State.Workspace.CurrentSolution.GetProject(_projectId); 64childrenBuilder.Add(this.State.CodeModelService.CreateExternalCodeElement(this.State, _projectId, member)); 70childrenBuilder.Add(this.State.CodeModelService.CreateExternalCodeElement(this.State, _projectId, typeMember));
CodeModel\Collections\ExternalNamespaceCollection.cs (2)
49foreach (var child in ExternalNamespaceEnumerator.ChildrenOfNamespace(this.State, _projectId, _namespaceSymbolId)) 94=> ExternalNamespaceEnumerator.Create(this.State, _projectId, _namespaceSymbolId);
CodeModel\Collections\ExternalOverloadsCollection.cs (1)
67var element = ExternalCodeFunction.Create(this.State, _projectId, (IMethodSymbol)method);
CodeModel\Collections\ExternalParameterCollection.cs (2)
58element = (EnvDTE.CodeElement)ExternalCodeParameter.Create(this.State, _projectId, parameters[index], this.ParentElement); 73element = (EnvDTE.CodeElement)ExternalCodeParameter.Create(this.State, _projectId, parameters[index], this.ParentElement);
CodeModel\Collections\ExternalTypeCollection.cs (4)
44element = this.State.CodeModelService.CreateCodeType(this.State, _projectId, _typeSymbols[index]); 58element = this.State.CodeModelService.CreateCodeType(this.State, _projectId, _typeSymbols[index]);
CodeModel\Collections\InheritsImplementsCollection.cs (1)
66return new NodeSnapshot(this.State, _fileCodeModel, node, parentElement,
CodeModel\Collections\NamespaceCollection.cs (7)
75return CodeOptionsStatement.Create(this.State, this.FileCodeModel, name, ordinal); 82return CodeImport.Create(this.State, this.FileCodeModel, parentElement, name); 89return (EnvDTE.CodeElement)CodeAttribute.Create(this.State, this.FileCodeModel, parentElement, name, ordinal); 105return new NodeSnapshot(this.State, _fileCodeModel, node, parentElement, 181element = CodeOptionsStatement.Create(State, FileCodeModel, childName, ordinal); 192element = CodeImport.Create(State, FileCodeModel, parentElement, childName); 203element = (EnvDTE.CodeElement)CodeAttribute.Create(State, FileCodeModel, parentElement, childName, ordinal);
CodeModel\Collections\ParameterCollection.cs (2)
46element = (EnvDTE.CodeElement)CodeParameter.Create(this.State, this.ParentElement, CodeModelService.GetParameterName(parameter)); 64element = (EnvDTE.CodeElement)CodeParameter.Create(this.State, this.ParentElement, name);
CodeModel\Collections\TypeCollection.cs (1)
66return new NodeSnapshot(this.State, _fileCodeModel, node, parentElement,
CodeModel\ExternalElements\AbstractExternalCodeElement.cs (5)
36var project = this.State.Workspace.CurrentSolution.GetProject(this.ProjectId); 48var symbol = CodeModelService.ResolveSymbol(this.State.Workspace, this.ProjectId, this.SymbolKey); 140return CodeModelService.CreateCodeType(this.State, this.ProjectId, symbol.ContainingType); 144return CodeModelService.CreateExternalCodeElement(this.State, this.ProjectId, symbol.ContainingNamespace); 165get { return EmptyCollection.Create(this.State, this); }
CodeModel\ExternalElements\AbstractExternalCodeMember.cs (1)
33=> ExternalParameterCollection.Create(this.State, this, this.ProjectId);
CodeModel\ExternalElements\AbstractExternalCodeType.cs (3)
72return ExternalTypeCollection.Create(this.State, this, this.ProjectId, 104get { return ExternalMemberCollection.Create(this.State, this, this.ProjectId, this.TypeSymbol); } 109get { return ExternalCodeNamespace.Create(this.State, this.ProjectId, this.TypeSymbol.ContainingNamespace); }
CodeModel\ExternalElements\ExternalCodeClass.cs (1)
64get { return ExternalTypeCollection.Create(this.State, this, this.ProjectId, TypeSymbol.AllInterfaces); }
CodeModel\ExternalElements\ExternalCodeEvent.cs (4)
53return ExternalCodeAccessorFunction.Create(this.State, this.ProjectId, symbol.AddMethod, this); 92return ExternalCodeAccessorFunction.Create(this.State, this.ProjectId, symbol.RemoveMethod, this); 112return ExternalCodeAccessorFunction.Create(this.State, this.ProjectId, symbol.RaiseMethod, this); 125return CodeTypeRef.Create(this.State, this, this.ProjectId, EventSymbol.Type);
CodeModel\ExternalElements\ExternalCodeFunction.cs (2)
90return ExternalOverloadsCollection.Create(this.State, this, this.ProjectId); 99return CodeTypeRef.Create(this.State, this, this.ProjectId, MethodSymbol.ReturnType);
CodeModel\ExternalElements\ExternalCodeNamespace.cs (1)
47get { return ExternalNamespaceCollection.Create(State, this, ProjectId, NamespaceSymbol); }
CodeModel\ExternalElements\ExternalCodeParameter.cs (1)
60return CodeTypeRef.Create(this.State, this, this.ProjectId, ParameterSymbol.Type);
CodeModel\ExternalElements\ExternalCodeProperty.cs (3)
53return ExternalCodeAccessorFunction.Create(this.State, this.ProjectId, symbol.GetMethod, this); 77return ExternalCodeAccessorFunction.Create(this.State, this.ProjectId, symbol.SetMethod, this); 90return CodeTypeRef.Create(this.State, this, this.ProjectId, PropertySymbol.Type);
CodeModel\ExternalElements\ExternalCodeStruct.cs (1)
51get { return ExternalTypeCollection.Create(this.State, this, this.ProjectId, TypeSymbol.AllInterfaces); }
CodeModel\ExternalElements\ExternalCodeVariable.cs (1)
94return CodeTypeRef.Create(this.State, this, this.ProjectId, type);
CodeModel\FileCodeModel.cs (12)
103=> State.ProjectCodeModelFactory.GlobalOptions; 137State.ProjectCodeModelFactory.ScheduleDeferredCleanupTask( 166var project = this.State.Workspace.CurrentSolution.GetProject(_incomingProjectId); 273return (T)CodeModelService.CreateInternalCodeElement(this.State, this, node); 349var formatted = State.ThreadingContext.JoinableTaskFactory.Run(async () => 419document = State.ThreadingContext.JoinableTaskFactory.Run( 441=> State.ThreadingContext.JoinableTaskFactory.Run(() => 448=> State.ThreadingContext.JoinableTaskFactory.Run(() => 455=> State.ThreadingContext.JoinableTaskFactory.Run(() => 630return CodeModelService.CreateInternalCodeElement(State, this, node); 638get { return NamespaceCollection.Create(this.State, this, this, SyntaxNodeKey.Empty); } 706var newDocument = State.ThreadingContext.JoinableTaskFactory.Run(async () =>
CodeModel\FileCodeModel_CodeGen.cs (15)
154return (EnvDTE80.CodeAttributeArgument)CodeModelService.CreateInternalCodeElement(this.State, fileCodeModel: this, node: newNode); 165return (EnvDTE.CodeAttribute)CodeModelService.CreateInternalCodeElement(this.State, fileCodeModel: this, node: newNode); 190return CodeParameter.Create(this.State, parentObj, CodeModelService.GetParameterName(newNode)); 224return (EnvDTE.CodeClass)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newType); 240return (EnvDTE.CodeDelegate)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newType); 254return (EnvDTE.CodeEnum)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newType); 283return (EnvDTE.CodeVariable)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newField); 299return (EnvDTE80.CodeEvent)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newEvent); 333return (EnvDTE.CodeFunction)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newMember); 343return (EnvDTE80.CodeImport)CodeModelService.CreateInternalCodeElement(this.State, fileCodeModel: this, node: newNode); 369return (EnvDTE.CodeInterface)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newType); 380return (EnvDTE.CodeNamespace)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newNamespace); 411return (EnvDTE.CodeProperty)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newProperty); 439return (EnvDTE.CodeStruct)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newType); 454return (EnvDTE.CodeVariable)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newField);
CodeModel\FileCodeModel_Events.cs (9)
24_ = _codeElementTable.CleanUpDeadObjectsAsync(State.ProjectCodeModelFactory.Listener).ReportNonFatalErrorAsync(); 58var projectCodeModel = this.State.ProjectCodeModelFactory.GetProjectCodeModel(document.Project.Id); 69var extensibility = (EnvDTE80.IVsExtensibility2)this.State.ServiceProvider.GetService(typeof(EnvDTE.IVsExtensibility)); 143element = this.CodeModelService.CreateUnknownRootNamespaceCodeElement(this.State, this); 161element = this.CodeModelService.CreateUnknownCodeElement(this.State, this, codeModelEvent.Node); 237return (EnvDTE.CodeElement)CodeParameter.Create(this.State, parentCodeElement, parameterName); 293return (EnvDTE.CodeElement)CodeAttribute.Create(this.State, this, parentCodeElement, name, ordinal); 301return (EnvDTE.CodeElement)CodeAttribute.Create(this.State, this, null, name, ordinal); 354return (EnvDTE.CodeElement)CodeAttributeArgument.Create(this.State, parentCodeElement, ordinal);
CodeModel\InternalElements\AbstractCodeElement.cs (2)
146=> State.ThreadingContext.JoinableTaskFactory.Run(() => GetDocument().GetLineFormattingOptionsAsync(GlobalOptions, CancellationToken.None).AsTask()); 252CodeModelService.Rename(LookupSymbol(), newName, this.Workspace, this.State.ProjectCodeModelFactory);
CodeModel\InternalElements\AbstractCodeMember.cs (2)
74return AttributeCollection.Create(this.State, this); 162get { return ParameterCollection.Create(this.State, this); }
CodeModel\InternalElements\AbstractCodeType.cs (5)
78return UnionCollection.Create(this.State, this, 80(ICodeElements)InheritsImplementsCollection.Create(this.State, this, this.FileCodeModel, this.NodeKey), 89return BasesCollection.Create(this.State, this, this.FileCodeModel, this.NodeKey, interfaces: false); 115return BasesCollection.Create(this.State, this, this.FileCodeModel, this.NodeKey, interfaces: true); 123return TypeCollection.Create(this.State, this, this.FileCodeModel, this.NodeKey);
CodeModel\InternalElements\CodeAccessorFunction.cs (2)
67=> EmptyCollection.Create(this.State, this); 79=> AttributeCollection.Create(this.State, this);
CodeModel\InternalElements\CodeAttribute.cs (1)
81get { return AttributeArgumentCollection.Create(this.State, this); }
CodeModel\InternalElements\CodeAttributeArgument.cs (1)
88get { return EmptyCollection.Create(this.State, this); }
CodeModel\InternalElements\CodeClass.cs (2)
134get { return PartialTypeCollection.Create(State, this); } 139get { return PartialTypeCollection.Create(State, this); }
CodeModel\InternalElements\CodeDelegate.cs (2)
82this.State, 92return CodeTypeRef.Create(this.State, this, GetProjectId(), LookupInvokeMethod().ReturnType);
CodeModel\InternalElements\CodeEvent.cs (4)
82return CodeAccessorFunction.Create(this.State, this, MethodKind.EventAdd); 110return CodeAccessorFunction.Create(this.State, this, MethodKind.EventRemove); 134return CodeAccessorFunction.Create(this.State, this, MethodKind.EventRaise); 151return CodeTypeRef.Create(this.State, this, GetProjectId(), EventSymbol.Type);
CodeModel\InternalElements\CodeFunction.cs (3)
139return OverloadsCollection.Create(this.FileCodeModel.State, this); 145get { return UnionCollection.Create(this.State, this, (ICodeElements)this.Attributes, (ICodeElements)this.Parameters); } 152return CodeTypeRef.Create(this.State, this, GetProjectId(), MethodSymbol.ReturnType);
CodeModel\InternalElements\CodeImplementsStatement.cs (1)
98get { return EmptyCollection.Create(this.State, this); }
CodeModel\InternalElements\CodeImport.cs (1)
145get { return EmptyCollection.Create(this.State, this); }
CodeModel\InternalElements\CodeInheritsStatement.cs (1)
98get { return EmptyCollection.Create(this.State, this); }
CodeModel\InternalElements\CodeInterface.cs (1)
91get { return PartialTypeCollection.Create(State, this); }
CodeModel\InternalElements\CodeNamespace.cs (1)
117return NamespaceCollection.Create(State, this, FileCodeModel, NodeKey);
CodeModel\InternalElements\CodeOptionsStatement.cs (1)
96get { return EmptyCollection.Create(this.State, this); }
CodeModel\InternalElements\CodeParameter.cs (3)
128get { return AttributeCollection.Create(this.State, this); } 148return CodeTypeRef.Create(this.State, this, GetProjectId(), ParameterSymbol.Type); 208this.Type = CodeTypeRef.Create(this.State, this, GetProjectId(), newType);
CodeModel\InternalElements\CodeProperty.cs (3)
155return CodeAccessorFunction.Create(this.State, this, MethodKind.PropertyGet); 173return CodeAccessorFunction.Create(this.State, this, MethodKind.PropertySet); 186return CodeTypeRef.Create(this.State, this, GetProjectId(), PropertySymbol.Type);
CodeModel\InternalElements\CodeStruct.cs (1)
83get { return PartialTypeCollection.Create(State, this); }
CodeModel\InternalElements\CodeVariable.cs (1)
144return CodeTypeRef.Create(this.State, this, GetProjectId(), type);
CodeModel\RootCodeModel.cs (4)
83return this.State.ProjectCodeModelFactory.GetProjectCodeModel(_projectId).GetOrCreateFileCodeModel(absoluteFilePath); 134var rootNamespace = ExternalCodeNamespace.Create(this.State, _projectId, compilation.GlobalNamespace); 150return (EnvDTE.CodeType)CodeModelService.CreateCodeType(this.State, _projectId, typeSymbol); 154=> CodeModelService.CreateCodeTypeRef(this.State, _projectId, type);
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (1)
CodeModel\CodeModelTestHelpers.vb (1)
191Dim state = codeElementImpl.State