InstrumentationType 列挙体とは? わかりやすく解説

InstrumentationType 列挙体

クラス提供する実装種類指定します

名前空間: System.Management.Instrumentation
アセンブリ: System.Management (system.management.dll 内)
構文構文

Public Enumeration InstrumentationType
Dim instance As InstrumentationType
public enum InstrumentationType
public enum class InstrumentationType
public enum InstrumentationType
public enum InstrumentationType
メンバメンバ
使用例使用例

次の例は、InstrumentationType 列挙体を使用して管理イベント クラス作成する方法示してます。

Imports System
Imports System.Management
Imports System.Configuration.Install
Imports System.Management.Instrumentation

' This sample demonstrates how to create
' a management event class by using
' the InstrumentationType enumeration

' Specify which namespace the management event
' class is created in
<Assembly: Instrumented("Root/Default")> 

' Let the system know InstallUtil.exe tool will
' be run against this assembly
<System.ComponentModel.RunInstaller(True)> _
Public Class MyInstaller
    Inherits DefaultManagementProjectInstaller
End Class 'MyInstaller

Namespace WMISample
    ' Create a management instrumentation event class
    <InstrumentationClass(InstrumentationType.Event)> _
    Public Class MyEvent
        Private EventName As String
        Function setEventName(ByVal name As
 String)
            EventName = name
        End Function
    End Class

    Public Class SampleEventProvider
        Public Shared Function
 Main(ByVal args() _
            As String) As
 Integer

            Dim e As New
 MyEvent
            e.setEventName("Hello")

            ' Fire a management event
            System.Management.Instrumentation. _
                Instrumentation.Fire(e)

            Return 0
        End Function
    End Class
End Namespace
using System;
using System.Management;
using System.Configuration.Install;
using System.Management.Instrumentation;

// This example demonstrates how to create
// a management event class by using
// the InstrumentationType enumeration

// Specify which namespace the management event
// class is created in
[assembly:Instrumented("Root/Default")]

// Let the system know you will run
// InstallUtil.exe tool against this assembly
[System.ComponentModel.RunInstaller(true)]
public class MyInstaller : 
    DefaultManagementProjectInstaller {}

namespace WMISample
{
    // Create a management instrumentation event class
    [InstrumentationClass(InstrumentationType.Event)]
    public class MyEvent
    {
        private string EventName;
        public void setEventName(string
 name)
        {
            EventName = name;
        }
    }

    public class WMIInstrumentedEventExample
    {
        public static void
 Main() 
        {
            MyEvent e = new MyEvent();
            e.setEventName("Hello");
        
            // Fire a management event
            Instrumentation.Fire(e);        
            return;
        }
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
System.Management.Instrumentation 名前空間



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

辞書ショートカット

すべての辞書の索引

「InstrumentationType 列挙体」の関連用語

InstrumentationType 列挙体のお隣キーワード
検索ランキング

   

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



InstrumentationType 列挙体のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS