コード例 #1
0
        public virtual EnvDTE.TextPoint GetEndPoint(EnvDTE.vsCMPart part)
        {
            var point = CodeModelService.GetEndPoint(LookupNode(), part);

            if (point == null)
            {
                return(null);
            }

            return(FileCodeModel.TextManagerAdapter.CreateTextPoint(FileCodeModel, point.Value));
        }
コード例 #2
0
        public virtual EnvDTE.TextPoint GetEndPoint(EnvDTE.vsCMPart part)
        {
            var options = State.ThreadingContext.JoinableTaskFactory.Run(() => GetDocument().GetOptionsAsync(CancellationToken.None));
            var point   = CodeModelService.GetEndPoint(LookupNode(), options, part);

            if (point == null)
            {
                return(null);
            }

            return(FileCodeModel.TextManagerAdapter.CreateTextPoint(FileCodeModel, point.Value));
        }
コード例 #3
0
        public virtual EnvDTE.TextPoint GetEndPoint(EnvDTE.vsCMPart part)
        {
            var options = GetDocument().GetOptionsAsync(CancellationToken.None).WaitAndGetResult_CodeModel(CancellationToken.None);
            var point   = CodeModelService.GetEndPoint(LookupNode(), options, part);

            if (point == null)
            {
                return(null);
            }

            return(FileCodeModel.TextManagerAdapter.CreateTextPoint(FileCodeModel, point.Value));
        }