-
Notifications
You must be signed in to change notification settings - Fork 14
/
RequiredAttribute.xml
88 lines (79 loc) · 4.02 KB
/
RequiredAttribute.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="RequiredAttribute" FullName="Microsoft.Build.Framework.RequiredAttribute">
<TypeSignature Language="C#" Value="public sealed class RequiredAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit RequiredAttribute extends System.Attribute" />
<TypeSignature Language="DocId" Value="T:Microsoft.Build.Framework.RequiredAttribute" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class RequiredAttribute
Inherits Attribute" />
<TypeSignature Language="F#" Value="type RequiredAttribute = class
 inherit Attribute" />
<TypeSignature Language="C++ CLI" Value="public ref class RequiredAttribute sealed : Attribute" />
<AssemblyInfo>
<AssemblyName>Microsoft.Build.Framework</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>15.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)]</AttributeName>
<AttributeName Language="F#">[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>
This class defines the attribute that a task writer can apply to a task's property to declare the property to be a
required property.
</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If a property marked with this attribute is not assigned a value when the task is invoked, the build will fail.
For more information about using attributes, see [Extending Metadata Using Attributes](/dotnet/standard/attributes/).
## Examples
The following example shows the code for a task that creates one or more directories.
:::code language="csharp" source="~/snippets/csharp/Microsoft.Build.Execution/ProjectItemInstance/Microsoft.Build.Framework.ITaskItem.ItemSpec/msbuild_MakeDirTask.cs" id="Snippet1":::
To run this task use a project file like this:
```xml
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="MyTarget">
<MkDir Directories="NewDir" />
</Target>
</Project>
```
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public RequiredAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Build.Framework.RequiredAttribute.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 RequiredAttribute();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Build.Framework</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>15.1.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>
Default constructor.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>