Skip to content

Commit 7156e37

Browse files
BillWagnergewarren
andcommitted
Apply suggestions from code review
Co-authored-by: Genevieve Warren <[email protected]>
1 parent 55988ad commit 7156e37

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/csharp/language-reference/attributes/general.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,11 @@ All overloads with a lower priority than the highest overload priority are remov
255255

256256
## EnumeratorCancellation attribute
257257

258-
The <xref:System.Runtime.CompilerServices.EnumeratorCancellationAttribute?displayProperty=nameWithType> attribute specifies which parameter should receive the cancellation token from <xref:System.Collections.Generic.IAsyncEnumerable`1.GetAsyncEnumerator(System.Threading.CancellationToken)?displayProperty=fullName> API. It's part of the infrastructure for the [async streams](../../asynchronous-programming/generate-consume-asynchronous-stream.md) feature.
258+
The <xref:System.Runtime.CompilerServices.EnumeratorCancellationAttribute?displayProperty=nameWithType> attribute specifies which parameter should receive the cancellation token from the <xref:System.Collections.Generic.IAsyncEnumerable`1.GetAsyncEnumerator(System.Threading.CancellationToken)?displayProperty=fullName> API. It's part of the infrastructure for the [async streams](../../asynchronous-programming/generate-consume-asynchronous-stream.md) feature.
259259

260260
## CollectionBuilder attribute
261261

262-
The <xref:System.Runtime.CompilerServices.CollectionBuilderAttribute?displayProperty=nameWithType> specifies a method that builds an instance of a collection type from a [collection expression](../operators/collection-expressions.md). You use this attribute to specify a method that builds the collection. The compiler generates code to call that method when a collection expression is converted to that type.
262+
The <xref:System.Runtime.CompilerServices.CollectionBuilderAttribute?displayProperty=nameWithType> attribute specifies a method that builds an instance of a collection type from a [collection expression](../operators/collection-expressions.md). You use this attribute to specify a method that builds the collection. The compiler generates code to call that method when a collection expression is converted to that type.
263263

264264
## InlineArray attribute
265265

docs/csharp/language-reference/attributes/pseudo-attributes.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ description: "Learn about attributes you can add to code that are written to IL
55
---
66
# Custom attributes that generate flags or options in the Intermediate Language (IL) output
77

8-
You add these attributes to your code for the compiler to emit specified Intermediate Language (IL) modifier. These attributes instruct the compiler to include the corresponding IL modifier in the output. These IL modifiers can be controlled in C# using these attributes:
8+
You add these attributes to your code for the compiler to emit a specified Intermediate Language (IL) modifier. These attributes instruct the compiler to include the corresponding IL modifier in the output.
99

1010
- <xref:System.Runtime.InteropServices.ComImportAttribute?displayProperty=fullName>: Specifies the `import` modifier.
1111
- <xref:System.Runtime.InteropServices.DllImportAttribute?displayProperty=fullName>: Specifies the `pinvokeimpl` modifier. You can add options listed in the constructor.
1212
- <xref:System.Runtime.InteropServices.FieldOffsetAttribute?displayProperty=fullName>: Specifies the `.field` offset modifier.
1313
- <xref:System.Runtime.InteropServices.MarshalAsAttribute>: Specifies the IL `marshal` modifier. You can set options listed in the constructor.
14-
4- <xref:System.Runtime.CompilerServices.MethodImplAttribute?displayProperty=fullName>: maps to the IL `flag` modifier. Constructor arguments specify specific named flags such as `aggressiveinlining` or `forwardref`. These flags also specify the `native`, `managed`, or `optil` modifiers for the <xref:System.Runtime.CompilerServices.MethodCodeType?displayProperty=fullName> field.
14+
4- <xref:System.Runtime.CompilerServices.MethodImplAttribute?displayProperty=fullName>: Maps to the IL `flag` modifier. Constructor arguments specify specific named flags such as `aggressiveinlining` or `forwardref`. These flags also specify the `native`, `managed`, or `optil` modifiers for the <xref:System.Runtime.CompilerServices.MethodCodeType?displayProperty=fullName> field.
1515
- <xref:System.NonSerializedAttribute?displayProperty=fullName>: Specifies the IL `notserialized` modifier.
1616
- <xref:System.Runtime.InteropServices.OptionalAttribute?displayProperty=fullName>: Specifies the IL `[opt]` modifier.
1717
- <xref:System.Runtime.InteropServices.OutAttribute?displayProperty=fullName>: Specifies the IL `[out]` modifier.
@@ -22,10 +22,10 @@ You add these attributes to your code for the compiler to emit specified Interme
2222

2323
Some of these custom attributes are applied using other C# syntax rather than adding the attribute to your source code.
2424

25-
- <xref:System.Runtime.InteropServices.DefaultParameterValueAttribute?displayProperty=fullName>: Specifies the default value for the parameter. Use the [default parameter syntax](../../methods.md#optional-parameters-and-arguments)
25+
- <xref:System.Runtime.InteropServices.DefaultParameterValueAttribute?displayProperty=fullName>: Specifies the default value for the parameter. Use the [default parameter syntax](../../methods.md#optional-parameters-and-arguments).
2626
- <xref:System.Runtime.InteropServices.InAttribute?displayProperty=fullName>: Specifies the IL `[in]` modifier. Use the [`in`](../keywords/method-parameters.md#in-parameter-modifier) or [`ref readonly`](../keywords/method-parameters.md#ref-readonly-modifier).
2727
- <xref:System.Runtime.CompilerServices.SpecialNameAttribute?displayProperty=fullName>: Specifies the IL `specialname` modifier. The compiler automatically uses the for methods that require the `specialname` modifier.
28-
- <xref:System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute?displayProperty=nameWithType>: This attribute is required for the `delegate*` feature. The compiler adds it to any [`delegate*`](../unsafe-code.md#function-pointers) requires its use.
28+
- <xref:System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute?displayProperty=nameWithType>: This attribute is required for the `delegate*` feature. The compiler adds it to any [`delegate*`](../unsafe-code.md#function-pointers) that requires its use.
2929

3030
The following custom attributes are generally disallowed in C# source. They're listed here to aid library authors who use reflection, and to ensure you don't create custom attributes with the same name.
3131

@@ -41,7 +41,7 @@ The following custom attributes are generally disallowed in C# source. They're l
4141
- <xref:System.Runtime.CompilerServices.IsUnmanagedAttribute?displayProperty=fullName> - This attribute specifies the `unmanaged` constraint on a type parameter.
4242
- <xref:System.Runtime.CompilerServices.NullableAttribute?displayProperty=fullName>, <xref:System.Runtime.CompilerServices.NullableContextAttribute?displayProperty=fullName>, <xref:System.Runtime.CompilerServices.NullablePublicOnlyAttribute?displayProperty=fullName>: These attributes encode nullable annotations in your source code.
4343
- <xref:System.ParamArrayAttribute?displayProperty=fullName>: This attribute encodes the `params` modifier on array parameters.
44-
- <xref:System.Runtime.CompilerServices.ParamCollectionAttribute?displayProperty=fullName> This attribute encodes the `params` on non-array parameters.
44+
- <xref:System.Runtime.CompilerServices.ParamCollectionAttribute?displayProperty=fullName> This attribute encodes the `params` modifier on non-array parameters.
4545
- <xref:System.Runtime.CompilerServices.RefSafetyRulesAttribute?displayProperty=fullName>: This attribute specifies the C# version that is required in order to understand ref safety annotations in the assembly. Ref safety rules evolve as C# gets new features.
4646
- <xref:System.Runtime.CompilerServices.RequiredMemberAttribute?displayProperty=fullName>: This attribute indicates that the `required` modifier was placed on a member declaration. It's the encoding of the [required members](../keywords/required.md) language feature.
4747
- <xref:System.Runtime.CompilerServices.TupleElementNamesAttribute?displayProperty=fullName>: This attribute encodes tuple element names used in signatures.

0 commit comments

Comments
 (0)