internal static ComHandle <EnvDTE80.FileCodeModel2, FileCodeModel> Create( CodeModelState state, object parent, DocumentId documentId, ITextManagerAdapter textManagerAdapter) { return(new FileCodeModel(state, parent, documentId, textManagerAdapter).GetComHandle <EnvDTE80.FileCodeModel2, FileCodeModel>()); }
internal static ComHandle <EnvDTE80.FileCodeModel2, FileCodeModel> Create( CodeModelState state, object?parent, DocumentId documentId, bool isSourceGeneratorOutput, ITextManagerAdapter textManagerAdapter) { return(new FileCodeModel(state, parent, documentId, isSourceGeneratorOutput, textManagerAdapter).GetComHandle <EnvDTE80.FileCodeModel2, FileCodeModel>()); }
internal static ComHandle <EnvDTE80.FileCodeModel2, FileCodeModel> Create( CodeModelState state, object?parent, DocumentId documentId, bool isSourceGeneratorOutput, ITextManagerAdapter textManagerAdapter) { // Keep track that code model was accessed. We want to get a sense of how widespread usage of it still is. Logger.Log(FunctionId.CodeModel_FileCodeModel_Create); return(new FileCodeModel(state, parent, documentId, isSourceGeneratorOutput, textManagerAdapter).GetComHandle <EnvDTE80.FileCodeModel2, FileCodeModel>()); }
private FileCodeModel( CodeModelState state, object parent, DocumentId documentId, ITextManagerAdapter textManagerAdapter) : base(state) { Debug.Assert(documentId != null); Debug.Assert(textManagerAdapter != null); _parentHandle = new ComHandle <object, object>(parent); _documentId = documentId; _textManagerAdapter = textManagerAdapter; _elementTable = new ElementTable(); _batchMode = false; _batchDocument = null; _lastSyntaxTree = GetSyntaxTree(); }
private FileCodeModel( CodeModelState state, object parent, DocumentId documentId, ITextManagerAdapter textManagerAdapter) : base(state) { Debug.Assert(documentId != null); Debug.Assert(textManagerAdapter != null); _parentHandle = new ComHandle <object, object>(parent); _documentId = documentId; TextManagerAdapter = textManagerAdapter; _codeElementTable = new CleanableWeakComHandleTable <SyntaxNodeKey, EnvDTE.CodeElement>(state.ThreadingContext); _batchMode = false; _batchDocument = null; _lastSyntaxTree = GetSyntaxTree(); }
private FileCodeModel( CodeModelState state, object?parent, DocumentId documentId, bool isSourceGeneratedOutput, ITextManagerAdapter textManagerAdapter) : base(state) { RoslynDebug.AssertNotNull(documentId); RoslynDebug.AssertNotNull(textManagerAdapter); _parentHandle = new ComHandle <object?, object?>(parent); _documentId = documentId; _isSourceGeneratedOutput = isSourceGeneratedOutput; TextManagerAdapter = textManagerAdapter; _codeElementTable = new CleanableWeakComHandleTable <SyntaxNodeKey, EnvDTE.CodeElement>(state.ThreadingContext); _batchMode = false; _batchDocument = null; _lastSyntaxTree = GetSyntaxTree(); }