WMI006-WMI学习笔记(六)——Schemas(模式(.NET))

原文地址链接:http://msdn.microsoft.com/en-us/library/aa338813(v=vs.71).aspx

Schemas

.NET Framework 1.1

In WMI, information is published using schemas. Schemas group management classes and instances that are used within a particular management environment and which present a consistent and unified view of all types of logical and physical objects. Management objects are represented using object-oriented constructs such as classes. The classes include properties that describe data and methods that describe behavior. Third-party developers can create their own custom schemas to describe vendor-specific environments. Because schemas are meant to be infinitely extensible, developers can always add new classes to represent new managed objects in an existing environment.

在WMI中,信息被以模式的形式发布。

模式是管理类和实例的组合。

这些管理类和实例用于特定的管理环境,并一致地表现所有的逻辑和物理的对象。

管理对象使用面向对象的结构(例如类)来表示。

类包括描述数据的属性和描述行为的方法。

第三方开发者可以创建自己的自定义模式来描述他们制定的环境。

因为模式可以被无限制地扩展下去,所以开发者总是可以添加新的类,用于展示在一个村子的环境中 的新管理对象。

(译注:此类第三方开发者,开发的产品都是高端应用产品。。。)

When surfacing information through WMI, good schema is critical to enable tools to manage your application. Structuring information in a schema is an essential feature for a distributed management system; it allows operations to be defined that can be confidently processed across a range of systems, all of which support the schema. The existence of the schema provides the ability to discover what can be done, as well as facilitating the actual performance of the enabled operations. Schemas provide the ability to represent, control, and configure the structure of the environment.

当使用WMI来获取信息时,好的模式对于管理你的应用程序来说是很关键的。

对于分布的管理系统,模式中的结构化信息是必须的特征。

WMI also supports associations, which are instances of association classes and are used to represent relationships between WMI objects. Association relationships are visible to management applications. WMI defines association classes to support system classes. Third-party developers can also define association classes for their management environment.

WMI同样实现了关系,它是类之间关系的实例,用于表示WMI实例间的关系。

Because the System.Management.Instrumentation namespace allows developers to customize the mapping between managed classes and WMI classes, it is possible to have the best of both worlds. Application developers are free to define classes with the structure that is most natural to their applications. The managed classes can be mapped to WMI classes that conform to WMI schema standards. This allows developers to be productive when using the managed classes, but allows management tools to properly interpret the instrumentation data provided by the application.

由于System.Management.Instrumentation命名空间允许开发者自定义地映射管理类和WMI类,因为可以拥有两个世界(.NET应用程序和系统的WMI)的最佳效果。

开发者可以自由地定义符合于他们的应用程序结构的类。

管理类映射到WMI类,需要符合WMI模式标准。

自定义管理类,使得开发者的开发更高效,只需要允许管理工具适当地“口译”应用程序提供的管理数据。

(译注:因为自定义类扩展自WMI类的,所以需要动态地解析自定义类为WMI类)

See Also

Using WMI with the .NET Framework | Queries | Management Events | System.Management and System.Management.Instrumentation Namespaces


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值