2010-04-06 Jb Evain <jbevain@novell.com>
[mcs.git] / class / Mono.Debugger.Soft / Mono.Debugger.Soft / Event.cs
blob6a09dea218ed1ebb9aea54683729e863e3ad56dc
2 namespace Mono.Debugger.Soft
4 public abstract class Event {
5 protected VirtualMachine vm;
6 EventType evtype;
7 ThreadMirror thread;
8 int req_id;
9 long thread_id;
11 internal Event (EventType evtype, VirtualMachine vm, int req_id, long thread_id) {
12 this.evtype = evtype;
13 this.vm = vm;
14 this.req_id = req_id;
15 this.thread_id = thread_id;
18 internal Event (EventType evtype, VirtualMachine vm) {
19 this.evtype = evtype;
20 this.vm = vm;
21 this.thread_id = -1;
24 public EventType EventType {
25 get {
26 return evtype;
30 public override string ToString () {
31 return evtype.ToString ();
34 public ThreadMirror Thread {
35 get {
36 if (thread_id == -1)
37 return null;
38 if (thread == null)
39 thread = vm.GetThread (thread_id);
40 return thread;
44 public EventRequest Request {
45 get {
46 return vm.GetRequest (req_id);