ManagementQuery.ParseQuery(String) 메서드

정의

쿼리 문자열을 구문 분석하고 그에 따라 속성 값을 설정합니다. 쿼리가 유효한 경우 쿼리의 클래스 이름 속성 및 조건 속성이 구문 분석됩니다.

protected public:
 virtual void ParseQuery(System::String ^ query);
protected internal virtual void ParseQuery(string query);
abstract member ParseQuery : string -> unit
override this.ParseQuery : string -> unit
Protected Friend Overridable Sub ParseQuery (query As String)

매개 변수

query
String

구문 분석할 쿼리 문자열입니다.

예제

다음 예제에서는 쿼리를 클래스 이름 및 조건 속성으로 구문 분석합니다.

using System;
using System.Management;

public class Sample
{
    public static void Main()
    {

        SelectQuery query = new SelectQuery("SELECT * " +
            "FROM Win32_LogicalDisk " +
            "WHERE FreeSpace < 4000000");
        // The query is parsed so that the className property
        // is Win32_LogicalDisk and the condition property
        // is FreeSpace < 4000000
    }
}
Imports System.Management


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

        Dim query As SelectQuery
        query = New SelectQuery("SELECT * " & _
            "FROM Win32_LogicalDisk " & _
            "WHERE FreeSpace < 4000000")
        ' The query is parsed so that the className property
        ' is Win32_LogicalDisk and the condition property
        ' is FreeSpace < 4000000

    End Function
End Class

설명

.NET Framework 보안

즉시 호출자에 대한 완전 신뢰입니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분적으로 신뢰할 수 있는 코드의 라이브러리 사용을 참조하세요.

적용 대상