PerformanceCounterInstaller クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > PerformanceCounterInstaller クラスの意味・解説 

PerformanceCounterInstaller クラス

PerformanceCounter コンポーネントインストーラ指定します

名前空間: System.Diagnostics
アセンブリ: System.Configuration.Install (system.configuration.install.dll 内)
構文構文

Public Class PerformanceCounterInstaller
    Inherits ComponentInstaller
Dim instance As PerformanceCounterInstaller
public class PerformanceCounterInstaller :
 ComponentInstaller
public ref class PerformanceCounterInstaller
 : public ComponentInstaller
public class PerformanceCounterInstaller extends
 ComponentInstaller
public class PerformanceCounterInstaller extends
 ComponentInstaller
解説解説
使用例使用例
Imports System
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
         Console.WriteLine("Error occured :" + e.Message)
      End Try
   End Sub 'New
   Public Shared Sub Main()
   End Sub 'Main
End Class 'MyPerformanceCounterInstaller
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)
      {
         Console.WriteLine("Error occured :"+e.Message);
      }
   }
   public static void Main()
   {
   }
}
#using <System.dll>
#using <System.Configuration.Install.dll>

using namespace System;
using namespace System::Configuration::Install;
using namespace System::Diagnostics;
using namespace System::ComponentModel;

[RunInstaller(true)]
ref class MyPerformanceCounterInstaller: public
 Installer
{
public:
   MyPerformanceCounterInstaller()
   {
      try
      {
         // Create an instance of 'PerformanceCounterInstaller'.
         PerformanceCounterInstaller^ myPerformanceCounterInstaller =
            gcnew PerformanceCounterInstaller;
         // Set the 'CategoryName' for performance counter.
         myPerformanceCounterInstaller->CategoryName =
            "MyPerformanceCounter";
         CounterCreationData^ myCounterCreation = gcnew 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 ) 
      {
         Console::WriteLine( "Error occured :{0}", e->Message );
      }
   }
};
import System.*;
import System.Configuration.Install.*;
import System.Diagnostics.*;
import System.ComponentModel.*;

/** @attribute RunInstaller(true)
 */
public class MyPerformanceCounterInstaller
 extends Installer
{
    public MyPerformanceCounterInstaller()
    {
        try {
            // Create an instance of 'PerformanceCounterInstaller'.
            PerformanceCounterInstaller myPerformanceCounterInstaller =
                new PerformanceCounterInstaller();
            // Set the 'CategoryName' for performance counter.
            myPerformanceCounterInstaller.set_CategoryName(
                "MyPerformanceCounter");
            CounterCreationData myCounterCreation = 
                new CounterCreationData();
            myCounterCreation.set_CounterName("MyCounter");
            myCounterCreation.set_CounterHelp("Counter Help");
            // Add a counter to collection of  myPerformanceCounterInstaller.
            myPerformanceCounterInstaller.get_Counters().Add(myCounterCreation);
            InstallerCollection installers = null;
            installers.Add(myPerformanceCounterInstaller);
        }
        catch (System.Exception e) {
            Console.WriteLine("Error occured :" + e.get_Message());
        }
    } //MyPerformanceCounterInstaller

    public static void main(String[]
 args)
    {
    } //main
} //MyPerformanceCounterInstaller
継承階層継承階層
System.Object
   System.MarshalByRefObject
     System.ComponentModel.Component
       System.Configuration.Install.Installer
         System.Configuration.Install.ComponentInstaller
          System.Diagnostics.PerformanceCounterInstaller
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からPerformanceCounterInstaller クラスを検索した結果を表示しています。
Weblioに収録されているすべての辞書からPerformanceCounterInstaller クラスを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からPerformanceCounterInstaller クラス を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「PerformanceCounterInstaller クラス」の関連用語

PerformanceCounterInstaller クラスのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



PerformanceCounterInstaller クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS