WMI009-WMI学习笔记(九)——System.Management and System.Management.Instrumentation Namespaces(命名空间)
2012-04-15 12:48
357 查看
原文地址链接:http://msdn.microsoft.com/en-us/library/aa720682(v=vs.71).aspx
.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(关键字)
.NET Framework Applications with System.Management | Schemas | Queries | Management
Events
System.Management and System.Management.Instrumentation Namespaces
.NET Framework 1.1The 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
相关文章推荐
- system.management 命名空间是 .net 框架中的 wmi 命名空间
- C++学习笔记:高级编程:文件和流,异常处理,动态内存,命名空间
- [XML]学习笔记(四)——命名空间
- C# 学习笔记(三)----- 设备监视 ( System.Management )
- C#学习常用命名空间【3000】---System.IO
- PHP入门学习笔记之—— PHP 命名空间
- C++基础学习笔记----第五课(动态内存分配、命名空间、强制类型转换)
- [原创]java WEB学习笔记98:Spring学习---Spring Bean配置及相关细节:如何在配置bean,Spring容器(BeanFactory,ApplicationContext),如何获取bean,属性赋值(属性注入,构造器注入),配置bean细节(字面值,包含特殊字符,引用bean,null值,集合属性list map propert),util 和p 命名空间
- C++ 学习笔记(3)命名空间using、字符串、string、vector、迭代器、数组
- C++学习笔记6--高级强制类型转换 命名空间和模块化编程 C预处理器 链接和作用域 函数模板 类模板 内联模板 容器和算法
- c#命名空间的学习笔记
- PHP 面向对象程序设计(oop)学习笔记 (五) - PHP 命名空间
- Javascript学习笔记之函数篇(六) : 作用域与命名空间
- JavaScript权威设计--命名空间,函数,闭包(简要学习笔记十二)
- C#学习常用的命名空间---System.Data.Linq(语言集成查询)
- 学习笔记(二)C#获取当前正在执行的代码的命名空间、类、方法的名称
- 学习笔记----命名空间
- C++ Primer学习笔记6 标准库类型(命名空间的using声明、标准库string类型)
- 【DirectX 11 SDK 学习笔记】Shaders and Effect System
- C++学习笔记(九):作用域和命名空间