System.Drawing: added email to icon and test file headers
[mono.git] / mcs / class / Mono.Debugger.Soft / Mono.Debugger.Soft / StepEventRequest.cs
1 using System;
2 using System.Collections.Generic;
3
4 namespace Mono.Debugger.Soft
5 {
6         public enum StepDepth {
7                 Into = 0,
8                 Over = 1,
9                 Out = 2
10         }
11
12         public enum StepSize {
13                 Min = 0,
14                 Line = 1
15         }
16
17         /*
18          * Filter which kinds of methods to skip during single stepping
19          */
20         public enum StepFilter {
21                 None = 0,
22                 StaticCtor = 1
23         }
24
25         public sealed class StepEventRequest : EventRequest {
26
27                 ThreadMirror step_thread;
28                 StepDepth depth;
29                 StepSize size;
30                 StepFilter filter;
31                 
32                 internal StepEventRequest (VirtualMachine vm, ThreadMirror thread) : base (vm, EventType.Step) {
33                         if (thread == null)
34                                 throw new ArgumentNullException ("thread");
35                         CheckMirror (vm, thread);
36                         this.step_thread = thread;
37                         Depth = StepDepth.Into;
38                         Size = StepSize.Min;
39                 }
40
41                 public override void Enable () {
42                         var mods = new List <Modifier> ();
43                         mods.Add (new StepModifier () { Thread = step_thread.Id, Depth = (int)Depth, Size = (int)Size, Filter = (int)Filter });
44                         SendReq (mods);
45                 }
46
47                 public new ThreadMirror Thread {
48                         get {
49                                 return step_thread;
50                         }
51                 }
52
53                 public StepDepth Depth {
54                         get {
55                                 return depth;
56                         }
57                         set {
58                                 CheckDisabled ();
59                                 depth = value;
60                         }
61                 }
62
63                 public StepSize Size {
64                         get {
65                                 return size;
66                         }
67                         set {
68                                 CheckDisabled ();
69                                 size = value;
70                         }
71                 }
72
73                 public StepFilter Filter {
74                         get {
75                                 return filter;
76                         }
77                         set {
78                                 CheckDisabled ();
79                                 filter = value;
80                         }
81                 }
82         }
83 }