ObjectQuery 类

定义

表示返回实例或类的管理查询。Represents a management query that returns instances or classes.

public ref class ObjectQuery : System::Management::ManagementQuery
public class ObjectQuery : System.Management.ManagementQuery
type ObjectQuery = class
    inherit ManagementQuery
Public Class ObjectQuery
Inherits ManagementQuery
继承
ObjectQuery
派生

注解

此类或其派生项用于指定中ManagementObjectSearcher的查询。This class or its derivatives are used to specify a query in the ManagementObjectSearcher. 尽可能使用更具体的查询类。Use a more specific query class whenever possible.

构造函数

ObjectQuery()

初始化 ObjectQuery 类的不带初始化值的新实例。Initializes a new instance of the ObjectQuery class with no initialized values. 这是无参数构造函数。This is the parameterless constructor.

ObjectQuery(String)

按照指定查询字符串初始化 ObjectQuery 类的新实例。Initializes a new instance of the ObjectQuery class for a specific query string.

ObjectQuery(String, String)

按照指定查询字符串和查询语言初始化 ObjectQuery 类的新实例。Initializes a new instance of the ObjectQuery class for a specific query string and language.

属性

QueryLanguage

获取或设置查询字符串中使用的查询语言,该语言定义查询字符串的格式。Gets or sets the query language used in the query string, defining the format of the query string.

(继承自 ManagementQuery)
QueryString

以文本格式获取或设置查询。Gets or sets the query in text format.

(继承自 ManagementQuery)

方法

Clone()

返回对象的一个副本。Returns a copy of the object.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ParseQuery(String)

分析查询字符串并相应地设置属性值。Parses the query string and sets the property values accordingly. 如果查询有效,将分析查询的类名属性和条件属性。If the query is valid, the class name property and condition property of the query will be parsed.

(继承自 ManagementQuery)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于