PerformanceCounterInstaller 클래스

정의

PerformanceCounter 구성 요소에 대한 설치 관리자를 지정합니다.

public ref class PerformanceCounterInstaller : System::Configuration::Install::ComponentInstaller
public class PerformanceCounterInstaller : System.Configuration.Install.ComponentInstaller
type PerformanceCounterInstaller = class
    inherit ComponentInstaller
Public Class PerformanceCounterInstaller
Inherits ComponentInstaller
상속

예제

다음 코드 예제에서는 개체를 만들고 개체에 PerformanceCounterInstallerInstallerCollection추가하는 방법을 보여 줍니다.

using System;
using System.Configuration.Install;
using System.Diagnostics;
using System.ComponentModel;

[RunInstaller(true)]
public class MyPerformanceCounterInstaller : Installer
{
    public MyPerformanceCounterInstaller()
    {
        try
        {
            // Create an instance of 'PerformanceCounterInstaller'.
            PerformanceCounterInstaller myPerformanceCounterInstaller =
               new PerformanceCounterInstaller();
            // Set the 'CategoryName' for performance counter.
            myPerformanceCounterInstaller.CategoryName =
               "MyPerformanceCounter";
            CounterCreationData myCounterCreation = new CounterCreationData();
            myCounterCreation.CounterName = "MyCounter";
            myCounterCreation.CounterHelp = "Counter Help";
            // Add a counter to collection of  myPerformanceCounterInstaller.
            myPerformanceCounterInstaller.Counters.Add(myCounterCreation);
            Installers.Add(myPerformanceCounterInstaller);
        }
        catch (Exception e)
        {
            this.Context.LogMessage("Error occurred :" + e.Message);
        }
    }
    public static void Main()
    {
    }
}
Imports System.Configuration.Install
Imports System.Diagnostics
Imports System.ComponentModel

<RunInstaller(True)> _
Public Class MyPerformanceCounterInstaller
    Inherits Installer
    Public Sub New()
        Try
            ' Create an instance of 'PerformanceCounterInstaller'.
            Dim myPerformanceCounterInstaller As New PerformanceCounterInstaller()
            ' Set the 'CategoryName' for performance counter.
            myPerformanceCounterInstaller.CategoryName = "MyPerformanceCounter"
            Dim myCounterCreation As New CounterCreationData()
            myCounterCreation.CounterName = "MyCounter"
            myCounterCreation.CounterHelp = "Counter Help"
            ' Add a counter to collection of  myPerformanceCounterInstaller.
            myPerformanceCounterInstaller.Counters.Add(myCounterCreation)
            Installers.Add(myPerformanceCounterInstaller)
        Catch e As Exception
            Me.Context.LogMessage("Error occurred :" + e.Message)
        End Try
    End Sub
    Public Shared Sub Main()
    End Sub
End Class

설명

다음 정보는 애플리케이션 시작 시 성능 카운터를 설치할 때 성능 향상을 제공하는 데 도움이 될 수 있습니다. .NET Framework 버전 2.0과 함께 설치된 성능 카운터 범주는 각 성능 카운터 범주에 고유한 메모리가 있는 별도의 공유 메모리를 사용합니다. 범주 이름\성능과 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<레지스트리 키에 FileMappingSize라는 DWORD를 만들어 별도의 공유 메모리 크기를 지정할 수 있습니다.> FileMappingSize 값은 범주의 공유 메모리 크기로 설정됩니다. 기본 크기는 131072 10진수입니다. FileMappingSize 값이 없 fileMappingSize 으면 Machine.config 파일에 지정된 요소의 특성 값 performanceCounters 이 사용되어 구성 파일 처리에 추가 오버헤드가 발생합니다. 레지스트리에서 파일 매핑 크기를 설정하여 애플리케이션 시작에 대한 성능 향상을 실현할 수 있습니다.

생성자

Name Description
PerformanceCounterInstaller()

PerformanceCounterInstaller 클래스의 새 인스턴스를 초기화합니다.

속성

Name Description
CanRaiseEvents

구성 요소가 이벤트를 발생시키는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Component)
CategoryHelp

성능 카운터에 대한 설명 메시지를 가져오거나 설정합니다.

CategoryName

성능 카운터의 성능 범주 이름을 가져오거나 설정합니다.

CategoryType

성능 카운터 범주 유형을 가져오거나 설정합니다.

Container

IContainer 포함하는 값을 가져옵니다 Component.

(다음에서 상속됨 Component)
Context

현재 설치에 대한 정보를 가져오거나 설정합니다.

(다음에서 상속됨 Installer)
Counters

설치할 카운터와 관련된 데이터 컬렉션을 가져옵니다.

DesignMode

현재 디자인 모드인지 여부를 Component 나타내는 값을 가져옵니다.

(다음에서 상속됨 Component)
Events

Component에 연결된 이벤트 처리기 목록을 가져옵니다.

(다음에서 상속됨 Component)
HelpText

설치 관리자 컬렉션의 모든 설치 관리자에 대한 도움말 텍스트를 가져옵니다.

(다음에서 상속됨 Installer)
Installers

이 설치 관리자에 포함된 설치 관리자의 컬렉션을 가져옵니다.

(다음에서 상속됨 Installer)
Parent

이 설치 관리자가 속한 컬렉션을 포함하는 설치 관리자를 가져오거나 설정합니다.

(다음에서 상속됨 Installer)
Site

ISite를 가져오거나 Component의 값을 설정합니다.

(다음에서 상속됨 Component)
UninstallAction

제거 시 성능 카운터를 제거할지 여부를 나타내는 값을 가져옵니다.

메서드

Name Description
Commit(IDictionary)

파생 클래스에서 재정의되면 설치 트랜잭션을 완료합니다.

(다음에서 상속됨 Installer)
CopyFromComponent(IComponent)

성능 카운터에 대해 설치 시 필요한 지정된 구성 요소의 모든 속성을 복사합니다.

CreateObjRef(Type)

원격 개체와 통신하는 데 사용되는 프록시를 생성하는 데 필요한 모든 관련 정보를 포함하는 개체를 만듭니다.

(다음에서 상속됨 MarshalByRefObject)
Dispose()

에서 사용하는 모든 리소스를 Component해제합니다.

(다음에서 상속됨 Component)
Dispose(Boolean)

관리되지 않는 리소스를 Component 해제하고 관리되는 리소스를 선택적으로 해제합니다.

(다음에서 상속됨 Component)
Equals(Object)

지정된 개체가 현재 개체와 같은지 여부를 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 사용됩니다.

(다음에서 상속됨 Object)
GetLifetimeService()
사용되지 않음.

이 인스턴스의 수명 정책을 제어하는 현재 수명 서비스 개체를 검색합니다.

(다음에서 상속됨 MarshalByRefObject)
GetService(Type)

또는 해당 서비스에서 제공하는 서비스를 나타내는 개체를 Component 반환합니다 Container.

(다음에서 상속됨 Component)
GetType()

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
InitializeLifetimeService()
사용되지 않음.

이 인스턴스의 수명 정책을 제어하는 수명 서비스 개체를 가져옵니다.

(다음에서 상속됨 MarshalByRefObject)
Install(IDictionary)

설치를 수행합니다.

IsEquivalentInstaller(ComponentInstaller)

지정된 설치 관리자가 이 설치 관리자와 동일한 개체를 설치하는지 여부를 확인합니다.

(다음에서 상속됨 ComponentInstaller)
MemberwiseClone()

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
MemberwiseClone(Boolean)

현재 MarshalByRefObject 개체의 단순 복사본을 만듭니다.

(다음에서 상속됨 MarshalByRefObject)
OnAfterInstall(IDictionary)

AfterInstall 이벤트를 발생시킵니다.

(다음에서 상속됨 Installer)
OnAfterRollback(IDictionary)

AfterRollback 이벤트를 발생시킵니다.

(다음에서 상속됨 Installer)
OnAfterUninstall(IDictionary)

AfterUninstall 이벤트를 발생시킵니다.

(다음에서 상속됨 Installer)
OnBeforeInstall(IDictionary)

BeforeInstall 이벤트를 발생시킵니다.

(다음에서 상속됨 Installer)
OnBeforeRollback(IDictionary)

BeforeRollback 이벤트를 발생시킵니다.

(다음에서 상속됨 Installer)
OnBeforeUninstall(IDictionary)

BeforeUninstall 이벤트를 발생시킵니다.

(다음에서 상속됨 Installer)
OnCommitted(IDictionary)

Committed 이벤트를 발생시킵니다.

(다음에서 상속됨 Installer)
OnCommitting(IDictionary)

Committing 이벤트를 발생시킵니다.

(다음에서 상속됨 Installer)
Rollback(IDictionary)

설치 전의 상태로 컴퓨터를 복원합니다.

ToString()

String(있는 경우)의 Component이름을 포함하는 값을 반환합니다. 이 메서드는 재정의해서는 안 됩니다.

(다음에서 상속됨 Component)
Uninstall(IDictionary)

설치를 제거합니다.

이벤트

Name Description
AfterInstall

속성에 있는 Install(IDictionary) 모든 설치 관리자의 메서드가 Installers 실행된 후에 발생합니다.

(다음에서 상속됨 Installer)
AfterRollback

속성에 있는 모든 설치 관리자 Installers 의 설치가 롤백된 후에 발생합니다.

(다음에서 상속됨 Installer)
AfterUninstall

속성의 모든 설치 관리자가 Installers 제거 작업을 수행한 후에 발생합니다.

(다음에서 상속됨 Installer)
BeforeInstall

설치 관리자 컬렉션의 Install(IDictionary) 각 설치 관리자 메서드가 실행되기 전에 발생합니다.

(다음에서 상속됨 Installer)
BeforeRollback

속성의 설치 관리자가 Installers 롤백되기 전에 발생합니다.

(다음에서 상속됨 Installer)
BeforeUninstall

속성의 설치 관리자가 Installers 제거 작업을 수행하기 전에 발생합니다.

(다음에서 상속됨 Installer)
Committed

속성의 모든 설치 관리자가 설치를 Installers 커밋한 후에 발생합니다.

(다음에서 상속됨 Installer)
Committing

속성의 설치 관리자가 설치를 Installers 커밋하기 전에 발생합니다.

(다음에서 상속됨 Installer)
Disposed

구성 요소가 메서드 호출에 Dispose() 의해 삭제될 때 발생합니다.

(다음에서 상속됨 Component)

적용 대상