ManagementTaskAttribute Class
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.] Namespace: System.Management
Assembly: System.Core (in System.Core.dll)
Exposes a task through a provider. An example of a management task is starting a process or stopping a service. The ManagementTask attribute marks methods that are exposed though an automation space, such as Windows Management Instrumentation (WMI). The exposed method completes the task.
Assembly: System.Core (in System.Core.dll)
The following example shows how to mark a method with the ManagementTask attribute to expose the method to WMI.
[C#]
// Use the ManagementTask attribute to specify that a method
// is exposed to WMI through this provider. Consumers will be
// able to execute this method through WMI.
[ManagementTask]
public void ResetCounters()
{
counter.Reset();
}
System.Object
System.Attribute
System.Management.ManagementMemberAttribute
System.Management.ManagementTaskAttribute
System.Attribute
System.Management.ManagementMemberAttribute
System.Management.ManagementTaskAttribute
Show: