146 references to State
Microsoft.VisualStudio.LanguageServices.Implementation (146)
CodeModel\AbstractCodeModelObject.cs (5)
53get { return this.State.CodeGenerator; } 58get { return this.State.CodeModelService; } 63get { return this.State.ServiceProvider; } 68get { return this.State.SyntaxFactsService; } 73get { return this.State.Workspace; }
CodeModel\CodeTypeRef.cs (5)
51if (CodeModelService.ResolveSymbol(this.State.Workspace, _projectId, _symbolId) is not ITypeSymbol typeSymbol) 71get { return (EnvDTE.CodeType)CodeModelService.CreateCodeType(this.State, _projectId, LookupTypeSymbol()); } 84return CodeTypeRef.Create(this.State, null, _projectId, arrayType); 94return CodeTypeRef.Create(this.State, this, _projectId, ((IArrayTypeSymbol)typeSymbol).ElementType); 98return 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)
45_children = [.. ExternalNamespaceEnumerator.ChildrenOfNamespace(this.State, _projectId, _namespaceSymbolId)]; 85=> 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)
60return new NodeSnapshot(this.State, _fileCodeModel, node, parentElement,
CodeModel\Collections\NamespaceCollection.cs (7)
74return CodeOptionsStatement.Create(this.State, this.FileCodeModel, name, ordinal); 81return CodeImport.Create(this.State, this.FileCodeModel, parentElement, name); 88return (EnvDTE.CodeElement)CodeAttribute.Create(this.State, this.FileCodeModel, parentElement, name, ordinal); 97return new NodeSnapshot(this.State, _fileCodeModel, node, parentElement, 178element = CodeOptionsStatement.Create(State, FileCodeModel, childName, ordinal); 189element = CodeImport.Create(State, FileCodeModel, parentElement, childName); 200element = (EnvDTE.CodeElement)CodeAttribute.Create(State, FileCodeModel, parentElement, childName, ordinal);
CodeModel\Collections\ParameterCollection.cs (2)
45element = (EnvDTE.CodeElement)CodeParameter.Create(this.State, this.ParentElement, CodeModelService.GetParameterName(parameter)); 63element = (EnvDTE.CodeElement)CodeParameter.Create(this.State, this.ParentElement, name);
CodeModel\Collections\TypeCollection.cs (1)
60return 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); 139return CodeModelService.CreateCodeType(this.State, this.ProjectId, symbol.ContainingType); 143return CodeModelService.CreateExternalCodeElement(this.State, this.ProjectId, symbol.ContainingNamespace); 164get { return EmptyCollection.Create(this.State, this); }
CodeModel\ExternalElements\AbstractExternalCodeMember.cs (1)
33=> ExternalParameterCollection.Create(this.State, this, this.ProjectId);
CodeModel\ExternalElements\AbstractExternalCodeType.cs (3)
69return ExternalTypeCollection.Create(this.State, this, this.ProjectId, 101get { return ExternalMemberCollection.Create(this.State, this, this.ProjectId, this.TypeSymbol); } 106get { 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)
45get { 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)
52return ExternalCodeAccessorFunction.Create(this.State, this.ProjectId, symbol.GetMethod, this); 76return ExternalCodeAccessorFunction.Create(this.State, this.ProjectId, symbol.SetMethod, this); 89return 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 (11)
132State.ProjectCodeModelFactory.ScheduleDeferredCleanupTask( 161var project = this.State.Workspace.CurrentSolution.GetProject(_incomingProjectId); 268return (T)CodeModelService.CreateInternalCodeElement(this.State, this, node); 344var formatted = State.ThreadingContext.JoinableTaskFactory.Run(async () => 414document = State.ThreadingContext.JoinableTaskFactory.Run( 436=> State.ThreadingContext.JoinableTaskFactory.Run(() => 443=> State.ThreadingContext.JoinableTaskFactory.Run(() => 450=> State.ThreadingContext.JoinableTaskFactory.Run(() => 625return CodeModelService.CreateInternalCodeElement(State, this, node); 633get { return NamespaceCollection.Create(this.State, this, this, SyntaxNodeKey.Empty); } 701var newDocument = State.ThreadingContext.JoinableTaskFactory.Run(async () =>
CodeModel\FileCodeModel_CodeGen.cs (15)
150return (EnvDTE80.CodeAttributeArgument)CodeModelService.CreateInternalCodeElement(this.State, fileCodeModel: this, node: newNode); 161return (EnvDTE.CodeAttribute)CodeModelService.CreateInternalCodeElement(this.State, fileCodeModel: this, node: newNode); 186return CodeParameter.Create(this.State, parentObj, CodeModelService.GetParameterName(newNode)); 220return (EnvDTE.CodeClass)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newType); 236return (EnvDTE.CodeDelegate)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newType); 250return (EnvDTE.CodeEnum)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newType); 279return (EnvDTE.CodeVariable)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newField); 295return (EnvDTE80.CodeEvent)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newEvent); 329return (EnvDTE.CodeFunction)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newMember); 339return (EnvDTE80.CodeImport)CodeModelService.CreateInternalCodeElement(this.State, fileCodeModel: this, node: newNode); 365return (EnvDTE.CodeInterface)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newType); 376return (EnvDTE.CodeNamespace)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newNamespace); 407return (EnvDTE.CodeProperty)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newProperty); 435return (EnvDTE.CodeStruct)CreateInternalCodeMember(this.State, fileCodeModel: this, node: newType); 450return (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)
142=> State.ThreadingContext.JoinableTaskFactory.Run(() => GetDocument().GetLineFormattingOptionsAsync(CancellationToken.None).AsTask()); 248CodeModelService.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)
76return UnionCollection.Create(this.State, this, 78(ICodeElements)InheritsImplementsCollection.Create(this.State, this, this.FileCodeModel, this.NodeKey), 87return BasesCollection.Create(this.State, this, this.FileCodeModel, this.NodeKey, interfaces: false); 113return BasesCollection.Create(this.State, this, this.FileCodeModel, this.NodeKey, interfaces: true); 121return 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)
116return 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 (9)
83return this.State.ProjectCodeModelFactory.GetProjectCodeModel(_projectId).GetOrCreateFileCodeModel(absoluteFilePath); 130=> this.State.ThreadingContext.JoinableTaskFactory.Run(async () => 136await this.State.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 137var rootNamespace = ExternalCodeNamespace.Create(this.State, _projectId, compilation.GlobalNamespace); 142=> this.State.ThreadingContext.JoinableTaskFactory.Run(async () => 154await this.State.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); 156return (EnvDTE.CodeType)CodeModelService.CreateCodeType(this.State, _projectId, typeSymbol); 160=> CodeModelService.CreateCodeTypeRef(this.State, _projectId, type); 169=> this.State.ThreadingContext.JoinableTaskFactory.Run(async () =>