OLD | NEW |
| (Empty) |
1 // Copyright 2010 The Native Client Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can | |
3 // be found in the LICENSE file. | |
4 using Microsoft.VisualStudio; | |
5 using Microsoft.VisualStudio.Debugger.Interop; | |
6 | |
7 namespace Google.MsAd7.BaseImpl { | |
8 /// <summary> | |
9 /// For documentation of IDebugErrorBreakpoint2 members, please see the VS 200
8 MSDN | |
10 /// documentation. | |
11 /// </summary> | |
12 public class ErrorBreakpoint : IDebugErrorBreakpoint2 { | |
13 public ErrorBreakpoint(ErrorBreakpointResolution resolution) { | |
14 resolution_ = resolution; | |
15 pendingBreakpoint_ = null; | |
16 } | |
17 | |
18 /// <summary> | |
19 /// This property has a public setter so the PendingBreakpoint can add itsel
f to the error | |
20 /// after BreakpointInfo generates it. | |
21 /// </summary> | |
22 public PendingBreakpoint PendingBreakpoint { | |
23 set { pendingBreakpoint_ = value; } | |
24 } | |
25 | |
26 #region IDebugErrorBreakpoint2 Members | |
27 | |
28 public int GetPendingBreakpoint( | |
29 out IDebugPendingBreakpoint2 ppPendingBreakpoint) { | |
30 ppPendingBreakpoint = null; | |
31 var haveBreakpoint = VSConstants.S_FALSE; | |
32 if (pendingBreakpoint_ != null) { | |
33 ppPendingBreakpoint = pendingBreakpoint_; | |
34 haveBreakpoint = VSConstants.S_OK; | |
35 } | |
36 return haveBreakpoint; | |
37 } | |
38 | |
39 public int GetBreakpointResolution( | |
40 out IDebugErrorBreakpointResolution2 ppErrorResolution) { | |
41 ppErrorResolution = resolution_; | |
42 return VSConstants.S_OK; | |
43 } | |
44 | |
45 #endregion | |
46 | |
47 #region Private Implementation | |
48 | |
49 // The resolution of the error if there is one. | |
50 private readonly ErrorBreakpointResolution resolution_; | |
51 // the PendingBreakpoint that caused this error. | |
52 private PendingBreakpoint pendingBreakpoint_; | |
53 | |
54 #endregion | |
55 } | |
56 } | |
OLD | NEW |