次の方法で共有


WqlEventQuery.GroupByPropertyList プロパティ

同じ種類のイベントをグループ化するために使用するイベントのプロパティを取得または設定します。

Public Property GroupByPropertyList As StringCollection
[C#]
public StringCollection GroupByPropertyList {get; set;}
[C++]
public: __property StringCollection* get_GroupByPropertyList();public: __property void set_GroupByPropertyList(StringCollection*);
[JScript]
public function get GroupByPropertyList() : StringCollection;public function set GroupByPropertyList(StringCollection);

プロパティ値

グループ化の必要がない場合は null。それ以外の場合は、イベント プロパティ名のコレクション。

解説

このプロパティ値を設定すると、それまでにオブジェクトに格納された値をすべてオーバーライドします。クエリ文字列は新しいグループ化を反映するようにリビルドされます。

使用例

[Visual Basic, C#] この例では、クエリ "SELECT * FROM EmailEvent GROUP WITHIN 300 BY Sender " を表す新しい WqlEventQuery を作成します。これは、"10 分の間隔内で、 Sender プロパティによって集計したすべての EmailEvent イベントの通知を送信する" ことを示しています。

 
WqlEventQuery q = new WqlEventQuery();
q.EventClassName = "EmailEvent";
q.GroupWithinInterval = new TimeSpan(0,10,0);
q.GroupByPropertyList = new StringCollection();
q.GroupByPropertyList.Add("Sender");

[Visual Basic] 
Dim q As New WqlEventQuery()
q.EventClassName = "EmailEvent"
q.GroupWithinInterval = New TimeSpan(0,10,0)
q.GroupByPropertyList = New StringCollection()
q.GroupByPropertyList.Add("Sender")

[C++, JScript] C++ および JScript のサンプルはありません。Visual Basic および C# のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

.NET Framework セキュリティ:

参照

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