WMI009-WMI学习笔记(九)——System.Management and System.Management.Instrumentation Namespaces(命名空间)

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

System.Management and System.Management.Instrumentation Namespaces

.NET Framework 1.1

The System.Management namespace is the object model for management elements in the .NET Framework. The System.Management namespace tightly integrates management services with the .NET Framework applications and development tools to make .NET Framework applications more manageable, providing .NET Framework developers with health monitoring and troubleshooting capabilities in enterprise environments. Applications can also be managed by numerous third-party management applications, as well as through custom consoles, which can easily be written by IT organizations that capitalize on System.Management.

System.Management命名空间是.NET框架中管理元素的对象模型的命名空间。

System.Management命名空间,使用.NET框架应用程序和开发工具集高度地集成了管理服务。使得开发.NET框架应用程序更易于管理。在企业环境中,提供给.NET框架开发者更健康的监视和更好的排错能力。

应用程序也能够通过众多的第三方管理应用程序来管理。例如通过客户的控制台,IT组织可以使用 System.Management轻松地编写管理代码。

The following illustration identifies the three WMI tiers and identifies how System.Management is layered on WMI: Microsoft Windows Forms (Windows Forms), Web Forms/ASP.NET, and management applications can act as clients that access WMI instrumentation. Management providers can be either existing code that surfaces system or application instrumentation, or Windows Forms and Web Forms/ASP.NET Page Framework applications that expose management instrumentation about themselves to other clients.

以下的说明确定了WMI的三个层级,以及确定System.Management是怎样分层与WMI之上的。

 Microsoft Windows Forms (Windows Forms), Web Forms/ASP.NET,以及访问WMI的客户端管理应用程序。

The WMI architecture in the .NET Framework

The System.Management namespace provides a set of managed-code classes through which .NET Framework applications can access and manipulate management information provided from any source, such as Windows, native applications instrumented with WMI, as well as managed code instrumented with System.Management.Instrumentation. For simplicity, the classes in the System.Management namespace are sometimes referred to as the WMI client API, but by no means is it the only way to access WMI. Developers can use other technologies to access WMI, such as the native WMI COM interfaces (known as the IWbem interfaces), or the Automation-compatible WMI objects (known as theSWbemScripting objects). As shown in the illustration, when a Windows Forms-based, Web Forms-based, or traditional management application needs to determine how much memory a computer has, configure a network connection, or check the state of an IIS server, it can use a couple of lines of code to access the relevant data. The same is true for many other management tasks.

This functionality is supported by a set of WMI tools built in to the Microsoft Visual Studio .NET development environment. For example, the Visual Studio .NET Server Explorer Management Extension (downloadable from http://www.microsoft.com/downloads/release.asp?ReleaseID=31155) can be used to aid in development of management-aware applications.

Similarly, System.Management.Instrumentation is just one of several ways to provide information through WMI. The two namespaces are in no way dependent on each other. In other words, if you are providing information with System.Management.Instrumentation, this does not limit the visibility of your instrumentation to just the System.Management classes. If you use the System.Management classes, this will allow you to access to any WMI information, not just the instrumentation written using System.Management.Instrumentation.

Current limitations

The current version of System.Management.Instrumentation does not support the following WMI features. Note that this limitation applies only to managed code instrumented objects. Objects exposed through native C++ WMI providers can still expose these features, which will be accessible from managed code through System.Management classes.

  • Instrumented objects cannot expose writeable properties or methods.
  • 不能够显示可写的属性和方法。
  • Creation of qualifiers on instrumented objects is not supported.
  • 不支持在WMI对象上创建限制符(访问~)。
  • Properties of instrumented objects cannot be defined as keys.
  • 属性和对象不可以定义为Keys(关键字)
See Also

Accessing Management Information with System.Management | Instrumenting .NET Framework Applications with System.Management | Schemas | Queries | Management Events


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值