-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
ManagementCreateAttribute.xml
88 lines (78 loc) · 4.72 KB
/
ManagementCreateAttribute.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
<Type Name="ManagementCreateAttribute" FullName="System.Management.Instrumentation.ManagementCreateAttribute">
<TypeSignature Language="C#" Value="public sealed class ManagementCreateAttribute : System.Management.Instrumentation.ManagementNewInstanceAttribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ManagementCreateAttribute extends System.Management.Instrumentation.ManagementNewInstanceAttribute" />
<TypeSignature Language="DocId" Value="T:System.Management.Instrumentation.ManagementCreateAttribute" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class ManagementCreateAttribute
Inherits ManagementNewInstanceAttribute" />
<TypeSignature Language="F#" Value="type ManagementCreateAttribute = class
 inherit ManagementNewInstanceAttribute" />
<TypeSignature Language="C++ CLI" Value="public ref class ManagementCreateAttribute sealed : System::Management::Instrumentation::ManagementNewInstanceAttribute" />
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Management.Instrumentation.ManagementNewInstanceAttribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.AttributeUsage(System.AttributeTargets.Constructor | System.AttributeTargets.Method, AllowMultiple=false)]</AttributeName>
<AttributeName Language="F#">[<System.AttributeUsage(System.AttributeTargets.Constructor | System.AttributeTargets.Method, AllowMultiple=false)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>The ManagementCreateAttribute is used to indicate that a method creates a new instance of a managed entity.
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
The lifetime of a managed entity is not bound to the lifetime of the .NET object representing it. The provider can use the method marked with this attribute to create a new instance of the corresponding managed entity.
The method parameters should have the same name and type as the parameters of the class binding constructor.
Use of this attribute does not have any affect on registration of the WMI class in the repository. It is only used at runtime.
## Examples
The following example demonstrates how to use the ManagementCreate attribute.
```
[ManagementEntity]
public class ProcessInstance
{
[ManagementKey]
public int Id;
[ManagementCreate]
public ProcessInstance StartProcess(string cmdLine)
{
ProcessInstance newProcess = new ProcessInstance(cmdLine);
newProcess.Start();
return newProcess;
}
}
```
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ManagementCreateAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Management.Instrumentation.ManagementCreateAttribute.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 ManagementCreateAttribute();" />
<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.ManagementCreateAttribute" /> class. This is the parameterless constructor.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>