ManagementObject Class

Definition

表示 WMI 实例。Represents a WMI instance.

public ref class ManagementObject : System::Management::ManagementBaseObject, ICloneable
public class ManagementObject : System.Management.ManagementBaseObject, ICloneable
[System.Serializable]
public class ManagementObject : System.Management.ManagementBaseObject, ICloneable
type ManagementObject = class
    inherit ManagementBaseObject
    interface ICloneable
Public Class ManagementObject
Inherits ManagementBaseObject
Implements ICloneable
Inheritance
Derived
Attributes
Implements

Constructors

ManagementObject()

初始化 ManagementObject 类的新实例。Initializes a new instance of the ManagementObject class. 这就是无参数构造函数。This is the parameterless constructor.

ManagementObject(ManagementPath)

按指定的 WMI 对象路径初始化 ManagementObject 类的一个新实例。Initializes a new instance of the ManagementObject class for the specified WMI object path. 该路径作为 ManagementPath 提供。The path is provided as a ManagementPath.

ManagementObject(ManagementPath, ObjectGetOptions)

初始化 ManagementObject 类的一个新实例,并将其绑定到指定的 WMI 路径,包括指定的附加选项。Initializes a new instance of the ManagementObject class bound to the specified WMI path, including the specified additional options.

ManagementObject(ManagementScope, ManagementPath, ObjectGetOptions)

初始化 ManagementObject 类的一个新实例,它绑定到指定的 WMI 路径,并包括指定的选项。Initializes a new instance of the ManagementObject class bound to the specified WMI path that includes the specified options.

ManagementObject(SerializationInfo, StreamingContext)

初始化 ManagementObject 类的可序列化的新实例。Initializes a new instance of the ManagementObject class that is serializable.

ManagementObject(String)

按指定的 WMI 对象路径初始化 ManagementObject 类的一个新实例。Initializes a new instance of the ManagementObject class for the specified WMI object path. 该路径以字符串形式提供。The path is provided as a string.

ManagementObject(String, ObjectGetOptions)

初始化 ManagementObject 类的一个新实例,并将其绑定到指定的 WMI 路径,包括指定的附加选项。Initializes a new instance of the ManagementObject class bound to the specified WMI path, including the specified additional options. 在此变体中,可以将路径指定为字符串。In this variant, the path can be specified as a string.

ManagementObject(String, String, ObjectGetOptions)

初始化 ManagementObject 类的一个新实例,它绑定到指定的 WMI 路径,同时包括指定的选项。Initializes a new instance of the ManagementObject class bound to the specified WMI path, and includes the specified options. 范围和路径指定为字符串形式。The scope and the path are specified as strings.

Properties

CanRaiseEvents

获取一个指示组件是否可以引发事件的值。Gets a value indicating whether the component can raise an event.

(Inherited from Component)
ClassPath

获取或设置对象的类的路径。Gets or sets the path to the object's class.

Container

获取包含 IContainerComponentGets the IContainer that contains the Component.

(Inherited from Component)
DesignMode

获取一个值,用以指示 Component 当前是否处于设计模式。Gets a value that indicates whether the Component is currently in design mode.

(Inherited from Component)
Events

获取附加到此 Component 的事件处理程序的列表。Gets the list of event handlers that are attached to this Component.

(Inherited from Component)
Item[String]

通过 [] 符获取对属性值的访问。Gets access to property values through [] notation. 此属性是 ManagementBaseObject 类的索引器。This property is the indexer for the ManagementBaseObject class. 您可以使用由某个类型定义的默认索引属性,但不能显式定义自己的属性。You can use the default indexed properties defined by a type, but you cannot explicitly define your own. 但是,在某个类上指定 expando 特性将自动提供一个类型为 Object、索引类型为 String 的默认索引属性。However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.

(Inherited from ManagementBaseObject)
Options

获取或设置检索对象时要使用的其他信息。Gets or sets additional information to use when retrieving the object.

Path

获取或设置对象的 WMI 路径。Gets or sets the object's WMI path.

Properties

获取描述管理对象属性的 PropertyData 对象的集合。Gets a collection of PropertyData objects describing the properties of the management object.

(Inherited from ManagementBaseObject)
Qualifiers

获取管理对象中定义的 QualifierData 对象的集合。Gets the collection of QualifierData objects defined on the management object. 集合中的每个元素均包含限定符名称、值和风格等信息。Each element in the collection holds information such as the qualifier name, value, and flavor.

(Inherited from ManagementBaseObject)
Scope

获取或设置此对象在其中驻留的范围。Gets or sets the scope in which this object resides.

Site

获取或设置 ComponentISiteGets or sets the ISite of the Component.

(Inherited from Component)
SystemProperties

获取管理对象的 WMI 系统属性的集合(例如,类名、服务器和命名空间)。Gets the collection of WMI system properties of the management object (for example, the class name, server, and namespace). WMI 系统属性名以“”开头。WMI system property names begin with "".

(Inherited from ManagementBaseObject)

Methods

Clone()

创建对象的一个副本。Creates a copy of the object.

CompareTo(ManagementBaseObject, ComparisonSettings)

根据指定的选项,将此对象与另一对象进行比较。Compares this object to another, based on specified options.

(Inherited from ManagementBaseObject)
CopyTo(ManagementOperationObserver, ManagementPath)

将该对象异步复制到另一个位置。Copies the object to a different location, asynchronously.

CopyTo(ManagementOperationObserver, ManagementPath, PutOptions)

将该对象异步复制到另一个位置。Copies the object to a different location, asynchronously.

CopyTo(ManagementOperationObserver, String)

将该对象异步复制到另一个位置。Copies the object to a different location, asynchronously.

CopyTo(ManagementOperationObserver, String, PutOptions)

将该对象异步复制到另一个位置。Copies the object to a different location, asynchronously.

CopyTo(ManagementPath)

将对象复制到另一个位置。Copies the object to a different location.

CopyTo(ManagementPath, PutOptions)

将对象复制到另一个位置。Copies the object to a different location.

CopyTo(String)

将对象复制到另一个位置。Copies the object to a different location.

CopyTo(String, PutOptions)

将对象复制到另一个位置。Copies the object to a different location.

CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
Delete()

删除对象。Deletes the object.

Delete(DeleteOptions)

删除对象。Deletes the object.

Delete(ManagementOperationObserver)

删除对象。Deletes the object.

Delete(ManagementOperationObserver, DeleteOptions)

删除对象。Deletes the object.

Dispose()

释放由该组件使用的所有资源。Releases all resources used by the Component.

Dispose()

释放 ManagementBaseObject 使用的非托管资源。Releases the unmanaged resources used by the ManagementBaseObject.

(Inherited from ManagementBaseObject)
Dispose(Boolean)

释放 Component 使用的非托管资源,并选择性地释放托管资源。Releases the unmanaged resources used by the Component and optionally releases the managed resources.

(Inherited from Component)
Equals(Object)

比较两个管理对象。Compares two management objects.

(Inherited from ManagementBaseObject)
Get()

将 WMI 类信息绑定到管理对象。Binds WMI class information to the management object.

Get(ManagementOperationObserver)

异步绑定到管理对象。Binds to the management object asynchronously.

GetHashCode()

充当特定类型的哈希函数,适用于哈希算法以及哈希表之类的数据结构中。Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

(Inherited from ManagementBaseObject)
GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetMethodParameters(String)

返回一个 ManagementBaseObject,它表示方法的输入参数的列表。Returns a ManagementBaseObject representing the list of input parameters for a method.

GetObjectData(SerializationInfo, StreamingContext)

用反序列化此实例所表示的字段所必需的数据填充 SerializationInfoPopulates a SerializationInfo with the data necessary to deserialize the field represented by this instance.

GetObjectData(SerializationInfo, StreamingContext)

用反序列化此实例所表示的字段所必需的数据填充 SerializationInfoPopulates a SerializationInfo with the data necessary to deserialize the field represented by this instance.

(Inherited from ManagementBaseObject)
GetPropertyQualifierValue(String, String)

返回指定的属性限定符的值。Returns the value of the specified property qualifier.

(Inherited from ManagementBaseObject)
GetPropertyValue(String)

获取某属性值的等效访问器。Gets an equivalent accessor to a property's value.

(Inherited from ManagementBaseObject)
GetQualifierValue(String)

获取指定的限定符的值。Gets the value of the specified qualifier.

(Inherited from ManagementBaseObject)
GetRelated()

获取与该对象(联系对象)相关的对象的集合。Gets a collection of objects related to the object (associators).

GetRelated(ManagementOperationObserver)

异步获取与该对象(联系对象)相关的对象的集合。Gets a collection of objects related to the object (associators) asynchronously. 此调用会立即返回,并且会在结果可用时调用委托。This call returns immediately, and a delegate is called when the results are available.

GetRelated(ManagementOperationObserver, String)

获取与该对象(联系对象)相关的对象的集合。Gets a collection of objects related to the object (associators).

GetRelated(ManagementOperationObserver, String, String, String, String, String, String, Boolean, EnumerationOptions)

获取与该对象(联系对象)相关的对象的集合。Gets a collection of objects related to the object (associators).

GetRelated(String)

获取与该对象(联系对象)相关的对象的集合。Gets a collection of objects related to the object (associators).

GetRelated(String, String, String, String, String, String, Boolean, EnumerationOptions)

获取与该对象(联系对象)相关的对象的集合。Gets a collection of objects related to the object (associators).

GetRelationships()

获取该对象的关联的集合。Gets a collection of associations to the object.

GetRelationships(ManagementOperationObserver)

获取该对象的关联的集合。Gets a collection of associations to the object.

GetRelationships(ManagementOperationObserver, String)

获取该对象的关联的集合。Gets a collection of associations to the object.

GetRelationships(ManagementOperationObserver, String, String, String, Boolean, EnumerationOptions)

获取该对象的关联的集合。Gets a collection of associations to the object.

GetRelationships(String)

获取该对象的关联的集合。Gets a collection of associations to the object.

GetRelationships(String, String, String, Boolean, EnumerationOptions)

获取该对象的关联的集合。Gets a collection of associations to the object.

GetService(Type)

返回一个对象,该对象表示由 Component 或它的 Container 提供的服务。Returns an object that represents a service provided by the Component or by its Container.

(Inherited from Component)
GetText(TextFormat)

以指定的格式返回对象的文本化表示形式。Returns a textual representation of the object in the specified format.

(Inherited from ManagementBaseObject)
GetType()

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

(Inherited from Object)
InitializeLifetimeService()

获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
InvokeMethod(ManagementOperationObserver, String, ManagementBaseObject, InvokeMethodOptions)

对对象异步调用方法。Invokes a method on the object, asynchronously.

InvokeMethod(ManagementOperationObserver, String, Object[])

对对象异步调用方法。Invokes a method on the object, asynchronously.

InvokeMethod(String, ManagementBaseObject, InvokeMethodOptions)

对 WMI 对象调用方法。Invokes a method on the WMI object. 输入和输出参数表示为 ManagementBaseObject 对象。The input and output parameters are represented as ManagementBaseObject objects.

InvokeMethod(String, Object[])

对对象调用方法。Invokes a method on the object.

MemberwiseClone()

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

(Inherited from Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
Put()

提交对对象所做的更改。Commits the changes to the object.

Put(ManagementOperationObserver)

异步提交对对象所做的更改。Commits the changes to the object, asynchronously.

Put(ManagementOperationObserver, PutOptions)

使用指定的选项异步提交对对象所做的更改。Commits the changes to the object asynchronously and using the specified options.

Put(PutOptions)

提交对对象所做的更改。Commits the changes to the object.

SetPropertyQualifierValue(String, String, Object)

设置指定的属性限定符的值。Sets the value of the specified property qualifier.

(Inherited from ManagementBaseObject)
SetPropertyValue(String, Object)

设置指定属性的值。Sets the value of the named property.

(Inherited from ManagementBaseObject)
SetQualifierValue(String, Object)

设置指定的限定符的值。Sets the value of the named qualifier.

(Inherited from ManagementBaseObject)
ToString()

返回对象的完整路径。Returns the full path of the object. 这是对默认对象实现的重写。This is an override of the default object implementation.

Events

Disposed

在通过调用 Dispose() 方法释放组件时发生。Occurs when the component is disposed by a call to the Dispose() method.

(Inherited from Component)

Explicit Interface Implementations

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

实现 ISerializable 接口,并返回序列化 ManagementBaseObject 所需的数据。Implements the ISerializable interface and returns the data needed to serialize the ManagementBaseObject.

(Inherited from ManagementBaseObject)

Applies to