WqlEventQuery コンストラクタとは? わかりやすく解説

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

WqlEventQuery コンストラクタ (String, String, TimeSpan, String[])

指定したイベント クラス名条件グループ化間隔、およびグループ化プロパティ使用して、WqlEventQuery クラス新しインスタンス初期化します。

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

Public Sub New ( _
    eventClassName As String, _
    condition As String, _
    groupWithinInterval As TimeSpan, _
    groupByPropertyList As String() _
)
Dim eventClassName As String
Dim condition As String
Dim groupWithinInterval As TimeSpan
Dim groupByPropertyList As String()

Dim instance As New WqlEventQuery(eventClassName,
 condition, groupWithinInterval, groupByPropertyList)
public WqlEventQuery (
    string eventClassName,
    string condition,
    TimeSpan groupWithinInterval,
    string[] groupByPropertyList
)
public:
WqlEventQuery (
    String^ eventClassName, 
    String^ condition, 
    TimeSpan groupWithinInterval, 
    array<String^>^ groupByPropertyList
)
public WqlEventQuery (
    String eventClassName, 
    String condition, 
    TimeSpan groupWithinInterval, 
    String[] groupByPropertyList
)
public function WqlEventQuery (
    eventClassName : String, 
    condition : String, 
    groupWithinInterval : TimeSpan, 
    groupByPropertyList : String[]
)

パラメータ

eventClassName

クエリ実行するイベント クラスの名前。

condition

指定したクラスイベント適用される条件

groupWithinInterval

WMI多数イベントではなく 1 つ集約イベント送信する指定間隔

groupByPropertyList

イベントグループ化使用するイベント クラスプロパティ

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

WqlEventQuery コンストラクタ (String, TimeSpan, String)

指定したイベント クラス名ポーリング間隔、および条件使用して、WqlEventQuery クラス新しインスタンス初期化します。

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

Public Sub New ( _
    eventClassName As String, _
    withinInterval As TimeSpan, _
    condition As String _
)
Dim eventClassName As String
Dim withinInterval As TimeSpan
Dim condition As String

Dim instance As New WqlEventQuery(eventClassName,
 withinInterval, condition)
public WqlEventQuery (
    string eventClassName,
    TimeSpan withinInterval,
    string condition
)
public:
WqlEventQuery (
    String^ eventClassName, 
    TimeSpan withinInterval, 
    String^ condition
)
public WqlEventQuery (
    String eventClassName, 
    TimeSpan withinInterval, 
    String condition
)
public function WqlEventQuery (
    eventClassName : String, 
    withinInterval : TimeSpan, 
    condition : String
)

パラメータ

eventClassName

クエリ実行するイベント クラスの名前。

withinInterval

イベント受け取るまでの許容待機時間指定する TimeSpan 値。この値は、要求するクエリに対して明示的なイベント プロバイダがないクラス使用しますWMI は、条件ポーリング要求されます。この間隔は、イベント通知配信されるまでに経過する最大時間です。

condition

指定したクラスイベント適用される条件

使用例使用例

次の例では、イベント クエリ "SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE TargetInstance ISA Win32_Service" を作成します。これは、10 秒のポーリング間隔で、Win32_Service インスタンス作成通知送信します

Imports System
Imports System.Management


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

        ' Requests notification of the creation
        ' of Win32_Service instances with a 10 second
        ' allowed latency.
        Dim t As New TimeSpan(0,
 0, 10)
        Dim q As New WqlEventQuery("__InstanceCreationEvent",
 _
            t, "TargetInstance isa ""Win32_Service""")

        MessageBox.Show(q.QueryString)

    End Function 'Main
End Class 'EventSample
using System;
using System.Management;

public class EventSample 
{
    public static void Main(string[]
 args) 
    {
        // Requests notification of the creation
        // of Win32_Service instances with
        // a 10 second allowed latency.
        WqlEventQuery q = new WqlEventQuery("__InstanceCreationEvent",
 
            new TimeSpan(0,0,10), 
            "TargetInstance isa 'Win32_Service'");

        Console.WriteLine(q.QueryString);
        return;
    }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

WqlEventQuery コンストラクタ (String, TimeSpan, String, TimeSpan, String[], String)

指定したイベント クラス名条件グループ化間隔グループ化プロパティ、および指定したイベント数を使用して、WqlEventQuery クラス新しインスタンス初期化します。

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

Public Sub New ( _
    eventClassName As String, _
    withinInterval As TimeSpan, _
    condition As String, _
    groupWithinInterval As TimeSpan, _
    groupByPropertyList As String(), _
    havingCondition As String _
)
Dim eventClassName As String
Dim withinInterval As TimeSpan
Dim condition As String
Dim groupWithinInterval As TimeSpan
Dim groupByPropertyList As String()
Dim havingCondition As String

Dim instance As New WqlEventQuery(eventClassName,
 withinInterval, condition, groupWithinInterval, groupByPropertyList, havingCondition)
public WqlEventQuery (
    string eventClassName,
    TimeSpan withinInterval,
    string condition,
    TimeSpan groupWithinInterval,
    string[] groupByPropertyList,
    string havingCondition
)
public:
WqlEventQuery (
    String^ eventClassName, 
    TimeSpan withinInterval, 
    String^ condition, 
    TimeSpan groupWithinInterval, 
    array<String^>^ groupByPropertyList, 
    String^ havingCondition
)
public WqlEventQuery (
    String eventClassName, 
    TimeSpan withinInterval, 
    String condition, 
    TimeSpan groupWithinInterval, 
    String[] groupByPropertyList, 
    String havingCondition
)
public function WqlEventQuery (
    eventClassName : String, 
    withinInterval : TimeSpan, 
    condition : String, 
    groupWithinInterval : TimeSpan, 
    groupByPropertyList : String[], 
    havingCondition : String
)

パラメータ

eventClassName

クエリ実行するイベント クラスの名前。

withinInterval

イベント受け取るまでの許容待機時間指定する TimeSpan 値。この値は、要求するクエリに対して明示的なイベント プロバイダがないクラス使用しますWMI は、条件ポーリング要求されます。この間隔は、イベント通知配信されるまでに経過する最大時間です。

condition

指定したクラスイベント適用される条件

groupWithinInterval

WMI多数イベントではなく 1 つ集約イベント送信する指定間隔

groupByPropertyList

イベントグループ化使用するイベント クラスプロパティ

havingCondition

イベントの数に適用される条件

使用例使用例

次の例では、イベント クエリ "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance ISA Win32_NTLogEvent GROUP WITHIN 600 BY TargetInstance.SourceName HAVING NumberOfEvents > 15" を作成します。これは、同じソースから受け取った Win32_NTLogEvent イベントの数が 15超えた場合にだけ、集約イベント配信します

Imports System
Imports System.Management


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

        ' Requests sending aggregated events
        ' if the number of events exceeds 15.
        Dim props() As String
 = {"TargetInstance.SourceName"}
        Dim t As New TimeSpan(0,
 10, 0)
        Dim q As New WqlEventQuery("__InstanceCreationEvent",
 _
            System.TimeSpan.MaxValue, _
            "TargetInstance isa ""Win32_NTLogEvent""",
 _
            t, _
            props, _
            "NumberOfEvents >15")

        MessageBox.Show(q.QueryString)

    End Function 'Main
End Class 'EventSample
using System;
using System.Management;

public class EventSample 
{
    public static void Main(string[]
 args) 
    {
        // Requests sending aggregated events
        // if the number of events exceeds 15.
        String[] props = {"TargetInstance.SourceName"};
        WqlEventQuery q = 
            new WqlEventQuery(
            "__InstanceCreationEvent", 
            System.TimeSpan.MaxValue,
            "TargetInstance isa 'Win32_NTLogEvent'", 
            new TimeSpan(0,10,0), 
            props, 
            "NumberOfEvents >15");


        Console.WriteLine(q.QueryString);
        return;
    }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

WqlEventQuery コンストラクタ (String, String, TimeSpan)

指定したイベント クラス名条件、およびグループ化間隔使用して、WqlEventQuery クラス新しインスタンス初期化します。

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

Public Sub New ( _
    eventClassName As String, _
    condition As String, _
    groupWithinInterval As TimeSpan _
)
Dim eventClassName As String
Dim condition As String
Dim groupWithinInterval As TimeSpan

Dim instance As New WqlEventQuery(eventClassName,
 condition, groupWithinInterval)
public WqlEventQuery (
    string eventClassName,
    string condition,
    TimeSpan groupWithinInterval
)
public:
WqlEventQuery (
    String^ eventClassName, 
    String^ condition, 
    TimeSpan groupWithinInterval
)
public WqlEventQuery (
    String eventClassName, 
    String condition, 
    TimeSpan groupWithinInterval
)
public function WqlEventQuery (
    eventClassName : String, 
    condition : String, 
    groupWithinInterval : TimeSpan
)

パラメータ

eventClassName

クエリ実行するイベント クラスの名前。

condition

指定したクラスイベント適用される条件

groupWithinInterval

WMI多数イベントではなく 1 つ集約イベント送信する指定間隔

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

WqlEventQuery コンストラクタ (String)

指定したクエリ文字列またはイベント クラス名基づいて、WqlEventQuery クラス新しインスタンス初期化します。

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

Public Sub New ( _
    queryOrEventClassName As String _
)
Dim queryOrEventClassName As String

Dim instance As New WqlEventQuery(queryOrEventClassName)
public WqlEventQuery (
    string queryOrEventClassName
)
public:
WqlEventQuery (
    String^ queryOrEventClassName
)
public WqlEventQuery (
    String queryOrEventClassName
)
public function WqlEventQuery (
    queryOrEventClassName : String
)

パラメータ

queryOrEventClassName

イベント クエリ全体またはクエリ実行するイベント クラスの名前を表す文字列。オブジェクトは、有効なイベント クエリとして文字列解析しようとします成功しない場合パーサーは、そのパラメータイベント クラス名表していると見なします。

使用例使用例

クエリ指定して WqlEventQuery初期化してから、イベント指定して WqlEventQuery初期化する例を次に示します

Imports System
Imports System.Management


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

        '' Full query string specified to the constructor
        Dim q As New WqlEventQuery(
 _
            "SELECT * FROM Win32_ComputerShutdownEvent ")

        ' Only relevant event class name specified to the constructor
        ' Results in the same query as above   
        Dim query As New
 WqlEventQuery("Win32_ComputerShutdownEvent ")

        MessageBox.Show(query.QueryString)

    End Function 'Main
End Class 'EventSample
using System;
using System.Management;

public class EventSample 
{
    public static void Main(string[]
 args) 
    {
        // Full query string specified to the constructor
        WqlEventQuery q = 
            new WqlEventQuery("SELECT * FROM Win32_ComputerShutdownEvent");
   
        // Only relevant event class name specified to the constructor
   
        // Results in the same query as above.
        WqlEventQuery query =
            new WqlEventQuery("Win32_ComputerShutdownEvent
 ");

        Console.WriteLine(query.QueryString);
        return;
    }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

WqlEventQuery コンストラクタ (String, String)

指定した条件使用して指定したイベント クラス名の WqlEventQuery クラス新しインスタンス初期化します。

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

Public Sub New ( _
    eventClassName As String, _
    condition As String _
)
Dim eventClassName As String
Dim condition As String

Dim instance As New WqlEventQuery(eventClassName,
 condition)
public WqlEventQuery (
    string eventClassName,
    string condition
)
public:
WqlEventQuery (
    String^ eventClassName, 
    String^ condition
)
public WqlEventQuery (
    String eventClassName, 
    String condition
)
public function WqlEventQuery (
    eventClassName : String, 
    condition : String
)

パラメータ

eventClassName

クエリ実行するイベント クラスの名前。

condition

指定したクラスイベント適用される条件

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

WqlEventQuery コンストラクタ (String, TimeSpan)

指定した待機時間使用して指定したイベント クラスの WqlEventQuery クラス新しインスタンス初期化します。

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

Public Sub New ( _
    eventClassName As String, _
    withinInterval As TimeSpan _
)
Dim eventClassName As String
Dim withinInterval As TimeSpan

Dim instance As New WqlEventQuery(eventClassName,
 withinInterval)
public WqlEventQuery (
    string eventClassName,
    TimeSpan withinInterval
)
public:
WqlEventQuery (
    String^ eventClassName, 
    TimeSpan withinInterval
)
public WqlEventQuery (
    String eventClassName, 
    TimeSpan withinInterval
)
public function WqlEventQuery (
    eventClassName : String, 
    withinInterval : TimeSpan
)

パラメータ

eventClassName

クエリ実行するイベント クラスの名前。

withinInterval

イベント受け取るまでの許容待機時間指定する TimeSpan 値。この値は、要求するクエリに対して明示的なイベント プロバイダがないクラス使用しますWMI は、条件ポーリング要求されます。この間隔は、イベント通知配信されるまでに経過する最大時間です。

使用例使用例

イベントおよびイベント受け取るまでの許容待機時間指定する期間値を指定してWqlEventQuery初期化する例を次に示します

Imports System
Imports System.Management


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

        ' Requests all instance creation events,
        ' with a specified latency of
        ' 10 seconds. The query created
        ' is "SELECT * FROM __InstanceCreationEvent WITHIN 10"
        Dim t As New TimeSpan(0,
 0, 10)
        Dim q As New WqlEventQuery("__InstanceCreationEvent",
 t)

        MessageBox.Show(q.QueryString)

    End Function 'Main
End Class 'EventSample
using System;
using System.Management;

public class EventSample 
{
    public static void Main(string[]
 args) 
    {
        // Requests all instance creation events,
        // with a specified latency of
        // 10 seconds. The query created
        // is "SELECT * FROM __InstanceCreationEvent WITHIN 10"
        WqlEventQuery q = new WqlEventQuery("__InstanceCreationEvent"
,
            new TimeSpan(0,0,10));


        Console.WriteLine(q.QueryString);
        return;
    }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

WqlEventQuery コンストラクタ


オーバーロードの一覧オーバーロードの一覧

名前 説明
WqlEventQuery () WqlEventQuery クラス新しインスタンス初期化します。これは既定コンストラクタです。
WqlEventQuery (String) 指定したクエリ文字列またはイベント クラス名基づいてWqlEventQuery クラス新しインスタンス初期化します。
WqlEventQuery (String, String) 指定した条件使用して指定したイベント クラス名WqlEventQuery クラス新しインスタンス初期化します。
WqlEventQuery (String, TimeSpan) 指定した待機時間使用して指定したイベント クラスWqlEventQuery クラス新しインスタンス初期化します。
WqlEventQuery (String, String, TimeSpan) 指定したイベント クラス名条件、およびグループ化間隔使用してWqlEventQuery クラス新しインスタンス初期化します。
WqlEventQuery (String, TimeSpan, String) 指定したイベント クラス名ポーリング間隔、および条件使用してWqlEventQuery クラス新しインスタンス初期化します。
WqlEventQuery (String, String, TimeSpan, String[]) 指定したイベント クラス名条件グループ化間隔、およびグループ化プロパティ使用してWqlEventQuery クラス新しインスタンス初期化します。
WqlEventQuery (String, TimeSpan, String, TimeSpan, String[], String) 指定したイベント クラス名条件グループ化間隔グループ化プロパティ、および指定したイベント数を使用してWqlEventQuery クラス新しインスタンス初期化します。
参照参照

関連項目

WqlEventQuery クラス
WqlEventQuery メンバ
System.Management 名前空間

WqlEventQuery コンストラクタ ()



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

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

辞書ショートカット

すべての辞書の索引

「WqlEventQuery コンストラクタ」の関連用語

WqlEventQuery コンストラクタのお隣キーワード
検索ランキング

   

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



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

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

©2024 GRAS Group, Inc.RSS