1 instantiation of FileCodeModel
Microsoft.VisualStudio.LanguageServices.Implementation (1)
CodeModel\FileCodeModel.cs (1)
43return new FileCodeModel(state, parent, documentId, isSourceGeneratorOutput, textManagerAdapter).GetComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>();
171 references to FileCodeModel
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (4)
510/// Do not use this method directly! Instead, go through <see cref="FileCodeModel.GetOrCreateCodeElement{T}(SyntaxNode)"/> 514FileCodeModel fileCodeModel, 590public override EnvDTE.CodeElement CreateUnknownCodeElement(CodeModelState state, FileCodeModel fileCodeModel, SyntaxNode node) 640public override EnvDTE.CodeElement CreateUnknownRootNamespaceCodeElement(CodeModelState state, FileCodeModel fileCodeModel)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
CodeModel\FileCodeModelTestHelpers.cs (1)
56var codeModel = FileCodeModel.Create(state, null, document, isSourceGeneratorOutput: false, new MockTextManagerAdapter()).Handle;
CodeModel\MockTextManagerAdapter.cs (1)
17public EnvDTE.TextPoint CreateTextPoint(FileCodeModel fileCodeModel, VirtualTreePoint point)
Microsoft.VisualStudio.LanguageServices.Implementation (165)
CodeModel\AbstractCodeModelService.cs (20)
249/// Do not use this method directly! Instead, go through <see cref="FileCodeModel.GetOrCreateCodeElement{T}(SyntaxNode)"/> 253FileCodeModel fileCodeModel, 332protected EnvDTE.CodeFunction CreateInternalCodeAccessorFunction(CodeModelState state, FileCodeModel fileCodeModel, SyntaxNode node) 350protected EnvDTE.CodeAttribute CreateInternalCodeAttribute(CodeModelState state, FileCodeModel fileCodeModel, SyntaxNode node) 388protected EnvDTE80.CodeImport CreateInternalCodeImport(CodeModelState state, FileCodeModel fileCodeModel, SyntaxNode node) 402protected EnvDTE.CodeParameter CreateInternalCodeParameter(CodeModelState state, FileCodeModel fileCodeModel, SyntaxNode node) 421protected EnvDTE80.CodeElement2 CreateInternalCodeOptionStatement(CodeModelState state, FileCodeModel fileCodeModel, SyntaxNode node) 429protected EnvDTE80.CodeElement2 CreateInternalCodeInheritsStatement(CodeModelState state, FileCodeModel fileCodeModel, SyntaxNode node) 448protected EnvDTE80.CodeElement2 CreateInternalCodeImplementsStatement(CodeModelState state, FileCodeModel fileCodeModel, SyntaxNode node) 467protected EnvDTE80.CodeAttributeArgument CreateInternalCodeAttributeArgument(CodeModelState state, FileCodeModel fileCodeModel, SyntaxNode node) 477public abstract EnvDTE.CodeElement CreateUnknownCodeElement(CodeModelState state, FileCodeModel fileCodeModel, SyntaxNode node); 478public abstract EnvDTE.CodeElement CreateUnknownRootNamespaceCodeElement(CodeModelState state, FileCodeModel fileCodeModel); 623var underlyingFileCodeModel = ComAggregate.GetManagedObject<FileCodeModel>(fileCodeModel); 861public int PositionVariantToAttributeInsertionIndex(object position, SyntaxNode containerNode, FileCodeModel fileCodeModel) 875public int PositionVariantToAttributeArgumentInsertionIndex(object position, SyntaxNode containerNode, FileCodeModel fileCodeModel) 889public int PositionVariantToImportInsertionIndex(object position, SyntaxNode containerNode, FileCodeModel fileCodeModel) 903public int PositionVariantToParameterInsertionIndex(object position, SyntaxNode containerNode, FileCodeModel fileCodeModel) 926public int PositionVariantToMemberInsertionIndex(object position, SyntaxNode containerNode, FileCodeModel fileCodeModel) 939FileCodeModel fileCodeModel,
CodeModel\CodeModelProjectCache.CacheEntry.cs (5)
31private readonly WeakComHandle<EnvDTE80.FileCodeModel2, FileCodeModel> _fileCodeModelWeakComHandle; 33public CacheEntry(ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel> handle) 34=> _fileCodeModelWeakComHandle = new WeakComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>(handle); 44internal bool TryGetFileCodeModelInstanceWithoutCaringWhetherRcwIsAlive(out FileCodeModel fileCodeModel) 47public ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>? ComHandle
CodeModel\CodeModelProjectCache.cs (10)
65public ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel> GetOrCreateFileCodeModel(string filePath) 83return new ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>(newFileCodeModel); 86public ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>? GetComHandleForFileCodeModel(string filePath) 93public ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel> GetOrCreateFileCodeModel(string filePath, object? parent) 118var newFileCodeModel = FileCodeModel.Create(State, parent, documentId, isSourceGeneratorOutput: false, new TextManagerAdapter()); 155public IEnumerable<ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>> GetFileCodeModelInstances() 157var result = new List<ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>>(); 193ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>? comHandle = null; 209ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>? comHandleToRename = null; 210ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>? comHandleToShutDown = null;
CodeModel\Collections\AttributeCollection.cs (1)
40private FileCodeModel FileCodeModel
CodeModel\Collections\BasesCollection.cs (5)
28FileCodeModel fileCodeModel, 36private readonly ComHandle<EnvDTE.FileCodeModel, FileCodeModel> _fileCodeModel; 42FileCodeModel fileCodeModel, 49_fileCodeModel = new ComHandle<EnvDTE.FileCodeModel, FileCodeModel>(fileCodeModel); 54private FileCodeModel FileCodeModel
CodeModel\Collections\InheritsImplementsCollection.cs (5)
25FileCodeModel fileCodeModel, 32private readonly ComHandle<EnvDTE.FileCodeModel, FileCodeModel> _fileCodeModel; 38FileCodeModel fileCodeModel, 44_fileCodeModel = new ComHandle<EnvDTE.FileCodeModel, FileCodeModel>(fileCodeModel); 48private FileCodeModel FileCodeModel
CodeModel\Collections\NamespaceCollection.cs (5)
25FileCodeModel fileCodeModel, 32private readonly ComHandle<EnvDTE.FileCodeModel, FileCodeModel> _fileCodeModel; 38FileCodeModel fileCodeModel, 44_fileCodeModel = new ComHandle<EnvDTE.FileCodeModel, FileCodeModel>(fileCodeModel); 48private FileCodeModel FileCodeModel
CodeModel\Collections\NodeSnapshot.cs (3)
19private readonly ComHandle<EnvDTE.FileCodeModel, FileCodeModel> _fileCodeModel; 26ComHandle<EnvDTE.FileCodeModel, FileCodeModel> fileCodeModel, 43private FileCodeModel FileCodeModel
CodeModel\Collections\OverloadsCollection.cs (2)
80var fileCodeModel = ComAggregate.GetManagedObject<FileCodeModel>(fileCodeModelObject);
CodeModel\Collections\PartialTypeCollection.cs (2)
63var fileCodeModel = ComAggregate.GetManagedObject<FileCodeModel>(fileCodeModelObject);
CodeModel\Collections\TypeCollection.cs (5)
25FileCodeModel fileCodeModel, 32private readonly ComHandle<EnvDTE.FileCodeModel, FileCodeModel> _fileCodeModel; 38FileCodeModel fileCodeModel, 44_fileCodeModel = new ComHandle<EnvDTE.FileCodeModel, FileCodeModel>(fileCodeModel); 48private FileCodeModel FileCodeModel
CodeModel\FileCodeModel.cs (2)
34internal static ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel> Create( 43return new FileCodeModel(state, parent, documentId, isSourceGeneratorOutput, textManagerAdapter).GetComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>();
CodeModel\FileCodeModel_CodeGen.cs (1)
78private EnvDTE.CodeElement CreateInternalCodeMember(CodeModelState state, FileCodeModel fileCodeModel, SyntaxNode node)
CodeModel\FileCodeModel_Events.cs (4)
267var fileCodeModel = ComAggregate.GetManagedObject<FileCodeModel>(parentElement); 298var parentFileCodeModel = ComAggregate.TryGetManagedObject<FileCodeModel>(parentObject);
CodeModel\ICodeModelService.cs (9)
81/// Do not use this method directly! Instead, go through <see cref="FileCodeModel.GetOrCreateCodeElement{T}(SyntaxNode)"/> 83EnvDTE.CodeElement CreateInternalCodeElement(CodeModelState state, FileCodeModel fileCodeModel, SyntaxNode node); 85EnvDTE.CodeElement CreateUnknownCodeElement(CodeModelState state, FileCodeModel fileCodeModel, SyntaxNode node); 86EnvDTE.CodeElement CreateUnknownRootNamespaceCodeElement(CodeModelState state, FileCodeModel fileCodeModel); 292int PositionVariantToAttributeInsertionIndex(object position, SyntaxNode containerNode, FileCodeModel fileCodeModel); 293int PositionVariantToMemberInsertionIndex(object position, SyntaxNode containerNode, FileCodeModel fileCodeModel); 294int PositionVariantToAttributeArgumentInsertionIndex(object position, SyntaxNode containerNode, FileCodeModel fileCodeModel); 295int PositionVariantToImportInsertionIndex(object position, SyntaxNode containerNode, FileCodeModel fileCodeModel); 296int PositionVariantToParameterInsertionIndex(object position, SyntaxNode containerNode, FileCodeModel fileCodeModel);
CodeModel\InternalElements\AbstractCodeElement.cs (4)
23private readonly ComHandle<EnvDTE.FileCodeModel, FileCodeModel> _fileCodeModel; 28FileCodeModel fileCodeModel, 34_fileCodeModel = new ComHandle<EnvDTE.FileCodeModel, FileCodeModel>(fileCodeModel); 38internal FileCodeModel FileCodeModel
CodeModel\InternalElements\AbstractCodeMember.cs (2)
23FileCodeModel fileCodeModel, 32FileCodeModel fileCodeModel,
CodeModel\InternalElements\AbstractCodeType.cs (2)
21FileCodeModel fileCodeModel, 30FileCodeModel fileCodeModel,
CodeModel\InternalElements\AbstractKeyedCodeElement.cs (2)
25FileCodeModel fileCodeModel, 37FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeAttribute.cs (2)
22FileCodeModel fileCodeModel, 36private CodeAttribute(CodeModelState state, FileCodeModel fileCodeModel, AbstractCodeElement parent, string name, int ordinal)
CodeModel\InternalElements\CodeClass.cs (4)
28FileCodeModel fileCodeModel, 42FileCodeModel fileCodeModel, 53FileCodeModel fileCodeModel, 62FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeDelegate.cs (4)
20FileCodeModel fileCodeModel, 34FileCodeModel fileCodeModel, 44FileCodeModel fileCodeModel, 53FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeEnum.cs (4)
18FileCodeModel fileCodeModel, 32FileCodeModel fileCodeModel, 42FileCodeModel fileCodeModel, 51FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeEvent.cs (4)
21FileCodeModel fileCodeModel, 35FileCodeModel fileCodeModel, 45FileCodeModel fileCodeModel, 54FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeFunction.cs (4)
24FileCodeModel fileCodeModel, 38FileCodeModel fileCodeModel, 48FileCodeModel fileCodeModel, 57FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeFunctionDeclareDecl.cs (4)
16FileCodeModel fileCodeModel, 30FileCodeModel fileCodeModel, 40FileCodeModel fileCodeModel, 49FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeFunctionWithEventHandler.cs (4)
18FileCodeModel fileCodeModel, 32FileCodeModel fileCodeModel, 42FileCodeModel fileCodeModel, 51FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeImplementsStatement.cs (2)
33FileCodeModel fileCodeModel, 59FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeImport.cs (4)
23FileCodeModel fileCodeModel, 35FileCodeModel fileCodeModel, 48FileCodeModel fileCodeModel, 59FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeInheritsStatement.cs (2)
33FileCodeModel fileCodeModel, 59FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeInterface.cs (4)
19FileCodeModel fileCodeModel, 33FileCodeModel fileCodeModel, 43FileCodeModel fileCodeModel, 52FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeNamespace.cs (4)
22FileCodeModel fileCodeModel, 36FileCodeModel fileCodeModel, 46FileCodeModel fileCodeModel, 55FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeOptionsStatement.cs (4)
21FileCodeModel fileCodeModel, 33FileCodeModel fileCodeModel, 46FileCodeModel fileCodeModel, 57FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeProperty.cs (4)
22FileCodeModel fileCodeModel, 36FileCodeModel fileCodeModel, 46FileCodeModel fileCodeModel, 55FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeStruct.cs (4)
20FileCodeModel fileCodeModel, 34FileCodeModel fileCodeModel, 44FileCodeModel fileCodeModel, 53FileCodeModel fileCodeModel,
CodeModel\InternalElements\CodeVariable.cs (4)
20FileCodeModel fileCodeModel, 34FileCodeModel fileCodeModel, 44FileCodeModel fileCodeModel, 53FileCodeModel fileCodeModel,
CodeModel\ITextManagerAdapter.cs (1)
16EnvDTE.TextPoint CreateTextPoint(FileCodeModel fileCodeModel, VirtualTreePoint point);
CodeModel\NodeKeyValidation.cs (3)
14private readonly Dictionary<ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>, List<GlobalNodeKey>> _nodeKeysMap = []; 35public void AddFileCodeModel(FileCodeModel fileCodeModel) 37var handle = new ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>(fileCodeModel);
CodeModel\ProjectCodeModel.cs (6)
74internal IEnumerable<ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>> GetCachedFileCodeModelInstances() 77internal bool TryGetCachedFileCodeModel(string fileName, out ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel> fileCodeModelHandle) 89/// Gets or creates a <see cref="FileCodeModel"/> for the given file name. Because we don't have 92public ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel> GetOrCreateFileCodeModel(string filePath) 95public ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel> GetOrCreateFileCodeModel(string filePath, object parent) 122return FileCodeModel.Create(GetCodeModelCache().State, parent: null, sourceGeneratedDocument.Id, isSourceGeneratorOutput: true, new TextManagerAdapter()).Handle;
CodeModel\RootCodeModel.cs (1)
45private ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel> GetFileCodeModel(object location)
CodeModel\TextManagerAdapter.cs (1)
15public EnvDTE.TextPoint CreateTextPoint(FileCodeModel fileCodeModel, VirtualTreePoint point)
RoslynVisualStudioWorkspace.cs (2)
166var fileCodeModel = ComAggregate.GetManagedObject<FileCodeModel>(vsFileCodeModel);