-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
ManagementTaskAttribute.xml
125 lines (114 loc) · 7.72 KB
/
ManagementTaskAttribute.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<Type Name="ManagementTaskAttribute" FullName="System.Management.Instrumentation.ManagementTaskAttribute">
<TypeSignature Language="C#" Value="public sealed class ManagementTaskAttribute : System.Management.Instrumentation.ManagementMemberAttribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ManagementTaskAttribute extends System.Management.Instrumentation.ManagementMemberAttribute" />
<TypeSignature Language="DocId" Value="T:System.Management.Instrumentation.ManagementTaskAttribute" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class ManagementTaskAttribute
Inherits ManagementMemberAttribute" />
<TypeSignature Language="F#" Value="type ManagementTaskAttribute = class
 inherit ManagementMemberAttribute" />
<TypeSignature Language="C++ CLI" Value="public ref class ManagementTaskAttribute sealed : System::Management::Instrumentation::ManagementMemberAttribute" />
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Management.Instrumentation.ManagementMemberAttribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false)]</AttributeName>
<AttributeName Language="F#">[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>The ManagementTask attribute indicates that the target method implements a WMI method.
Note: the WMI .NET libraries are now considered in final state, and no further development, enhancements, or updates will be available for non-security related issues affecting these libraries. The [MI APIs](https://learn.microsoft.com/previous-versions/windows/desktop/wmi_v2/windows-management-infrastructure) should be used for all new development.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
By default, the WMI method name will be the name of the target method. The parent class of this attribute, <xref:System.Management.Instrumentation.ManagementMemberAttribute>, includes a Name parameter. You can use that parameter to change the name of the method that is exposed through WMI without changing your internal method name.
The method must be public and it may be static. It can include any combination of [in], [out], [in/out], array or object reference parameters. Array parameters cannot be multidimensional or jagged because of limitations imposed by WMI.
The return type of the method can be: void, scalar, string, datetime or object. It cannot be an array.
## Examples
The following example shows how to mark a method with the ManagementTask attribute to expose the method to WMI. The method will show up in WMI as ResetCounters.
```csharp
// 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();
}
```
]]></format>
</remarks>
<altmember cref="T:System.Management.Instrumentation.ManagementConfigurationAttribute" />
<altmember cref="T:System.Management.Instrumentation.ManagementEnumeratorAttribute" />
<altmember cref="T:System.Management.Instrumentation.ManagementProbeAttribute" />
<altmember cref="T:System.Management.Instrumentation.ManagementKeyAttribute" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ManagementTaskAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Management.Instrumentation.ManagementTaskAttribute.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 ManagementTaskAttribute();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Management.Instrumentation.ManagementTaskAttribute" /> class. This is the parameterless constructor.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Schema">
<MemberSignature Language="C#" Value="public Type Schema { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type Schema" />
<MemberSignature Language="DocId" Value="P:System.Management.Instrumentation.ManagementTaskAttribute.Schema" />
<MemberSignature Language="VB.NET" Value="Public Property Schema As Type" />
<MemberSignature Language="F#" Value="member this.Schema : Type with get, set" Usage="System.Management.Instrumentation.ManagementTaskAttribute.Schema" />
<MemberSignature Language="C++ CLI" Value="public:
 property Type ^ Schema { Type ^ get(); void set(Type ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Type</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that defines the type of output that the method that is marked with the ManagementTask attribute will output.</summary>
<value>A <see cref="T:System.Type" /> value that indicates the type of output that the method that is marked with the ManagementTask attribute will output.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the returned type is <xref:System.Object?displayProperty=nameWithType>, then the output should be treated as a value of type <xref:System.Object?displayProperty=nameWithType>.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>