-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
UnscopedRefAttribute.xml
62 lines (62 loc) · 3.61 KB
/
UnscopedRefAttribute.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
<Type Name="UnscopedRefAttribute" FullName="System.Diagnostics.CodeAnalysis.UnscopedRefAttribute">
<TypeSignature Language="C#" Value="public sealed class UnscopedRefAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit UnscopedRefAttribute extends System.Attribute" />
<TypeSignature Language="DocId" Value="T:System.Diagnostics.CodeAnalysis.UnscopedRefAttribute" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class UnscopedRefAttribute
Inherits Attribute" />
<TypeSignature Language="F#" Value="type UnscopedRefAttribute = class
 inherit Attribute" />
<TypeSignature Language="C++ CLI" Value="public ref class UnscopedRefAttribute sealed : Attribute" />
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.AttributeUsage(System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)]</AttributeName>
<AttributeName Language="F#">[<System.AttributeUsage(System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Used to indicate a byref escapes and is not scoped.</summary>
<remarks>
<para> There are several cases where the C# compiler treats a <see langword="ref" /> as implicitly <see langword="scoped" /> - where the compiler does not allow the <see langword="ref" /> to escape the method.</para>
<para> For example:</para>
<ol>
<li>
<see langword="this" /> for <see langword="struct" /> instance methods.</li>
<li>
<see langword="ref" /> parameters that refer to <see langword="ref struct" /> types.</li>
<li>
<see langword="out" /> parameters.</li>
</ol>
<para> This attribute is used in those instances where the <see langword="ref" /> should be allowed to escape.</para>
<para> Applying this attribute, in any form, has impact on consumers of the applicable API. It is necessary for API authors to understand the lifetime implications of applying this attribute and how it may impact their users.</para>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UnscopedRefAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.CodeAnalysis.UnscopedRefAttribute.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 UnscopedRefAttribute();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Diagnostics.CodeAnalysis.UnscopedRefAttribute" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>