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 보안

직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분적으로 신뢰할 수 있는 코드에서 라이브러리를 사용 하 여입니다.

적용 대상