CounterSet.AddCounter 메서드

정의

카운터 집합에 카운터를 추가합니다.

오버로드

Name Description
AddCounter(Int32, CounterType)

지정된 카운터 식별자 및 형식을 사용하여 카운터 집합에 카운터를 추가합니다.

AddCounter(Int32, CounterType, String)

지정된 카운터 식별자와 형식 및 카운터의 표시 이름을 사용하여 카운터 집합에 카운터를 추가합니다.

AddCounter(Int32, CounterType)

Source:
CounterSet.cs
Source:
CounterSet.cs
Source:
CounterSet.cs
Source:
CounterSet.cs
Source:
CounterSet.cs
Source:
CounterSet.cs
Source:
CounterSet.cs
Source:
CounterSet.cs

지정된 카운터 식별자 및 형식을 사용하여 카운터 집합에 카운터를 추가합니다.

public:
 void AddCounter(int counterId, System::Diagnostics::PerformanceData::CounterType counterType);
public void AddCounter(int counterId, System.Diagnostics.PerformanceData.CounterType counterType);
member this.AddCounter : int * System.Diagnostics.PerformanceData.CounterType -> unit
Public Sub AddCounter (counterId As Integer, counterType As CounterType)

매개 변수

counterId
Int32

카운터를 식별합니다. 매니페스트에서 사용한 것과 동일한 값을 사용하여 카운터를 정의합니다.

counterType
CounterType

카운터 유형을 식별합니다. 카운터 형식은 카운터 데이터를 계산, 평균 및 표시하는 방법을 결정합니다.

예외

카운터 식별자가 이미 집합에 있거나 음수이거나 카운터 형식이 NULL이거나 유효하지 않습니다.

카운터 집합의 인스턴스를 만든 후에는 카운터 집합에 카운터를 추가할 수 없습니다.

설명

카운터 집합의 인스턴스를 만들기 전에 카운터 집합에 카운터를 추가해야 합니다.

적용 대상

AddCounter(Int32, CounterType, String)

Source:
CounterSet.cs
Source:
CounterSet.cs
Source:
CounterSet.cs
Source:
CounterSet.cs
Source:
CounterSet.cs
Source:
CounterSet.cs
Source:
CounterSet.cs
Source:
CounterSet.cs

지정된 카운터 식별자와 형식 및 카운터의 표시 이름을 사용하여 카운터 집합에 카운터를 추가합니다.

public:
 void AddCounter(int counterId, System::Diagnostics::PerformanceData::CounterType counterType, System::String ^ counterName);
public void AddCounter(int counterId, System.Diagnostics.PerformanceData.CounterType counterType, string counterName);
member this.AddCounter : int * System.Diagnostics.PerformanceData.CounterType * string -> unit
Public Sub AddCounter (counterId As Integer, counterType As CounterType, counterName As String)

매개 변수

counterId
Int32

카운터를 식별합니다. 매니페스트에서 사용한 것과 동일한 값을 사용하여 카운터를 정의합니다.

counterType
CounterType

카운터 유형을 식별합니다. 카운터 형식은 카운터 데이터를 계산, 평균 및 표시하는 방법을 결정합니다.

counterName
String

카운터의 이름입니다. 이 이름을 사용하여 카운터 집합 인스턴스의 카운터를 인덱싱할 수 있습니다. (참조 Item[String])

예외

카운터 식별자가 이미 집합에 있거나 음수이거나 카운터 형식이 NULL이거나 유효하지 않습니다.

카운터 집합의 인스턴스를 만든 후에는 카운터 집합에 카운터를 추가할 수 없습니다.

예제

예제를 보려면 System.Diagnostics.PerformanceData를 참조하세요.

설명

카운터 집합의 인스턴스를 만들기 전에 카운터 집합에 카운터를 추가해야 합니다.

적용 대상