public Command(SingleSteppingEngine sse, TargetAccessDelegate func, object data) { this.Type = CommandType.TargetAccess; this.Engine = sse; this.Data1 = func; this.Data2 = data; }
internal object SendCommand(SingleSteppingEngine sse, TargetAccessDelegate target, object user_data) { Command command = new Command(sse, target, user_data); if (!engine_event.WaitOne(WaitTimeout, false)) { throw new TargetException(TargetError.NotStopped); } event_queue.Lock(); engine_event.Reset(); current_command = command; event_queue.Signal(); event_queue.Unlock(); engine_event.WaitOne(); if (command.Result is Exception) { throw (Exception)command.Result; } else { return(command.Result); } }
internal override object Invoke(TargetAccessDelegate func, object data) { throw new InvalidOperationException(); }
internal abstract object Invoke(TargetAccessDelegate func, object data);
internal override object Invoke(TargetAccessDelegate func, object data) { return SendCommand (delegate { return func (thread, data); }); }
object SendCommand(TargetAccessDelegate target) { if (inferior == null) throw new TargetException (TargetError.NoTarget); if (ThreadManager.InBackgroundThread) return target (thread, null); else return manager.SendCommand (this, target, null); }
object SendCommand(TargetAccessDelegate target) { return(target(null)); }
internal object SendCommand(SingleSteppingEngine sse, TargetAccessDelegate target, object user_data) { Command command = new Command (sse, target, user_data); if (!engine_event.WaitOne (WaitTimeout, false)) throw new TargetException (TargetError.NotStopped); event_queue.Lock (); engine_event.Reset (); current_command = command; event_queue.Signal (); event_queue.Unlock (); engine_event.WaitOne (); if (command.Result is Exception) throw (Exception) command.Result; else return command.Result; }
internal override object Invoke(TargetAccessDelegate func, object data) { throw new InvalidOperationException (); }
object SendCommand (TargetAccessDelegate target) { return target (null); }