Breakpoints.Count 속성
Breakpoints 컬렉션의 Breakpoint 개체 수를 나타내는 값을 반환합니다.
네임스페이스: EnvDTE
어셈블리: EnvDTE(EnvDTE.dll)
구문
‘선언
ReadOnly Property Count As Integer
Get
int Count { get; }
property int Count {
int get ();
}
abstract Count : int
function get Count () : int
속성 값
형식: System.Int32
컬렉션의 Breakpoint 개체 수를 나타내는 정수 값입니다.
예제
다음 예제에서는 Count 속성의 사용 방법을 보여 줍니다.
이 속성을 테스트하려면
public static void Count(DTE dte)
{
// Setup debug Output window.
Window w = (Window)dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);
w.Visible = true;
OutputWindow ow = (OutputWindow)w.Object;
OutputWindowPane owp = ow.OutputWindowPanes.Add("Count Property Test: ");
owp.Activate();
// dte is a reference to the DTE object passed to you by the
// OnConnection method that you implement when you create an add-in.
EnvDTE.Debugger debugger = (EnvDTE.Debugger)dte.Debugger;
debugger.Breakpoints.Add("","Target001.cs", 13, 1, "",
EnvDTE.dbgBreakpointConditionType.dbgBreakpointConditionTypeWhenTrue,
"C#","", 0, "", 0, EnvDTE.dbgHitCountType.dbgHitCountTypeNone);
debugger.Breakpoints.Add("","Target001.cs", 15, 1, "",
EnvDTE.dbgBreakpointConditionType.dbgBreakpointConditionTypeWhenTrue,
"C#","", 0, "", 0, EnvDTE.dbgHitCountType.dbgHitCountTypeNone);
owp.OutputString("\nNumber of Breakpoints: " + debugger.Breakpoints.Count);
owp.OutputString("\nEdition of the environment: " +
debugger.Breakpoints.DTE.Edition);
owp.OutputString("\nParent's Current Mode: " +
debugger.Breakpoints.Parent.CurrentMode);
owp.OutputString("\nFirst breakpoint is on line " +
debugger.Breakpoints.Item(1).FileLine + ".");
owp.OutputString("\nSecond breakpoint is on line " +
debugger.Breakpoints.Item(2).FileLine + ".");
}
Shared Sub Count(ByRef dte As EnvDTE.DTE)
Dim str As String
dte.Debugger.Breakpoints.Add("", "Target001.cs", 13, 1, "", _
EnvDTE.dbgBreakpointConditionType.dbgBreakpointConditionTypeWhenTrue, _
"C#", "", 0, "", 0, EnvDTE.dbgHitCountType.dbgHitCountTypeNone)
dte.Debugger.Breakpoints.Add("", "Target001.cs", 15, 1, "", _
EnvDTE.dbgBreakpointConditionType.dbgBreakpointConditionTypeWhenTrue, _
"C#", "", 0, "", 0, EnvDTE.dbgHitCountType.dbgHitCountTypeNone)
str = "Number of Breakpoints: " + dte.Debugger.Breakpoints.Count.ToString() + vbCrLf
str += "Edition of the environment: " + dte.Debugger.Breakpoints.DTE.Edition + vbCrLf
str += "Parent's Current Mode: " + dte.Debugger.Breakpoints.Parent.CurrentMode.ToString() + vbCrLf
str += "First breakpoint is on line " + dte.Debugger.Breakpoints.Item(1).FileLine.ToString() + "." + vbCrLf
str += "Second breakpoint is on line " + dte.Debugger.Breakpoints.Item(2).FileLine.ToString() + "." + vbCrLf
MessageBox.Show(str, "Count Property Test")
End Sub
.NET Framework 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.