コード例 #1
0
        public async Task <DkmTextSpan?> GetCurrentActiveStatementPositionAsync(Guid moduleId, int methodToken, int methodVersion, int ilOffset, CancellationToken cancellationToken)
        {
            var instructionId = new ActiveInstructionId(moduleId, methodToken, methodVersion, ilOffset);
            var span          = await _encService.GetCurrentActiveStatementPositionAsync(_workspace.CurrentSolution, instructionId, cancellationToken).ConfigureAwait(false);

            return(span?.ToDebuggerSpan());
        }
コード例 #2
0
        public async Task <DkmTextSpan?> GetCurrentActiveStatementPositionAsync(Guid moduleId, int methodToken, int methodVersion, int ilOffset, CancellationToken cancellationToken)
        {
            var solution = _workspace.CurrentSolution;

            var activeStatementSpanProvider = new SolutionActiveStatementSpanProvider(async(documentId, cancellationToken) =>
            {
                var document = solution.GetRequiredDocument(documentId);
                return(await _activeStatementTrackingService.GetSpansAsync(document, cancellationToken).ConfigureAwait(false));
            });

            var instructionId = new ActiveInstructionId(moduleId, methodToken, methodVersion, ilOffset);
            var span          = await _encService.GetCurrentActiveStatementPositionAsync(solution, activeStatementSpanProvider, instructionId, cancellationToken).ConfigureAwait(false);

            return(span?.ToDebuggerSpan());
        }
コード例 #3
0
 public async Task <VsTextSpan?> GetCurrentActiveStatementPositionAsync(Guid moduleId, int methodToken, int methodVersion, int ilOffset, CancellationToken cancellationToken)
 => (await _encService.GetCurrentActiveStatementPositionAsync(new ActiveInstructionId(moduleId, methodToken, methodVersion, ilOffset), cancellationToken).ConfigureAwait(false))?.ToVsTextSpan();