Beispiel #1
0
        public override async void Invoke(CancellationToken cancellationToken)
        {
            if (LastDocument != null)
            {
                var window = await IdeUtils.ShowWindowAsync <DisasmWindow>(cancellationToken);

                window?.ViewModel?.RunOperationAsync(await GetSymbol(LastDocument, LastTokenPos, cancellationToken));
            }
        }
        public override async void Invoke(CancellationToken cancellationToken)
        {
            DisasmWindow window = await IdeUtils.ShowWindowAsync <DisasmWindow>(cancellationToken);

            SyntaxNode syntaxNode = await _symbol.DeclaringSyntaxReferences.FirstOrDefault().GetSyntaxAsync();

            ITrackingSpan trackingSpan = SnapshotSpan.Snapshot.CreateTrackingSpan(new Span(syntaxNode.FullSpan.Start, syntaxNode.FullSpan.Length), SpanTrackingMode.EdgeInclusive);

            trackingSpan.TextBuffer.Insert(syntaxNode.SpanStart, "[BenchmarkDotNet.Attributes.Benchmark]" + Environment.NewLine + "\t\t");

            window?.ViewModel?.RunOperationAsync(_symbol, _codeDoc, OperationType.Benchmark);
        }
Beispiel #3
0
        public override async void Invoke(CancellationToken cancellationToken)
        {
            var window = await IdeUtils.ShowWindowAsync <DisasmWindow>(cancellationToken);

            window?.ViewModel?.RunOperationAsync(_symbol, _codeDoc, OperationType.ObjectLayout);
        }