Esempio n. 1
0
 public Task <ThreadsResponse> Handle(ThreadsArguments request, CancellationToken cancellationToken)
 {
     return(Task.FromResult(new ThreadsResponse
     {
         // TODO: This is an empty container of threads...do we need to make a thread?
         Threads = new Container <System.Threading.Thread>()
     }));
 }
Esempio n. 2
0
        protected override ThreadsResponse HandleThreadsRequest(ThreadsArguments arguments)
        {
            if (!this.stopped)
            {
                throw new ProtocolException("Not in break mode!");
            }

            return(this.ThreadManager.HandleThreadsRequest(arguments));
        }
Esempio n. 3
0
 protected override ThreadsResponse HandleThreadsRequest(ThreadsArguments arguments)
 {
     if (!Enabled)
     {
         throw new ProtocolException("非命令模式!");
     }
     return(new ThreadsResponse(new List <vsThread> {
         new vsThread(0, ThreadName)
     }));
 }
Esempio n. 4
0
 protected override ThreadsResponse HandleThreadsRequest(ThreadsArguments arguments)
 {
     return(new ThreadsResponse()
     {
         Threads = new List <Thread>
         {
             new Thread(0, "main")
         }
     });
 }
Esempio n. 5
0
        protected override ThreadsResponse HandleThreadsRequest(ThreadsArguments arguments)
        {
            ThreadsResponse res = new ThreadsResponse();

            foreach (var i in debugged.Threads)
            {
                VSCodeThread t = (VSCodeThread)i.Value;
                res.Threads.Add(t.Thread);
            }
            return(res);
        }
 public Task <ThreadsResponse> Handle(ThreadsArguments request, CancellationToken cancellationToken)
 {
     return(Task.FromResult(new ThreadsResponse
     {
         // TODO: OmniSharp supports multithreaded debugging (where
         // multiple threads can be debugged at once), but we don't. This
         // means we always need to set AllThreadsStoppped and
         // AllThreadsContinued in our events. But if we one day support
         // multithreaded debugging, we'd need a way to associate
         // debugged runspaces with .NET threads in a consistent way.
         Threads = new Container <Thread>(PipelineThread)
     }));
 }
 public Task <ThreadsResponse> Handle(ThreadsArguments request, CancellationToken cancellationToken)
 {
     return(Task.FromResult(new ThreadsResponse
     {
         // TODO: What do I do with these?
         Threads = new Container <OmniSharp.Extensions.DebugAdapter.Protocol.Models.Thread>(
             new OmniSharp.Extensions.DebugAdapter.Protocol.Models.Thread
         {
             Id = 1,
             Name = "Main Thread"
         })
     }));
 }
Esempio n. 8
0
        protected override ThreadsResponse HandleThreadsRequest(ThreadsArguments arguments)
        {
            try
            {
                if (session == null)
                {
                    throw new InvalidOperationException();
                }

                var threads = session.GetThreads().ToList();
                return(new ThreadsResponse(threads));
            }
            catch (Exception ex)
            {
                Log(ex.Message, LogCategory.DebugAdapterOutput);
                throw new ProtocolException(ex.Message, ex);
            }
        }
 public override Task <ThreadsResponse> Handle(ThreadsArguments request, CancellationToken cancellationToken) => _handler.Invoke(request, cancellationToken);
 public abstract Task <ThreadsResponse> Handle(ThreadsArguments request, CancellationToken cancellationToken);
 internal ThreadsResponse HandleThreadsRequest(ThreadsArguments args)
 {
     return(new ThreadsResponse(threads: this.threads.Select(t => t.GetProtocolThread()).ToList()));
 }