Skip to content

Commit 1ba5991

Browse files
authored
Minor editorial tweaks to the Attributes chapter (#1119)
* Add new attribute support to Example * Add previous section reference
1 parent d67b599 commit 1ba5991

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

standard/attributes.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ The compilation of an *attribute* with attribute class `T`, *positional_argumen
474474
475475
### 22.4.3 Run-time retrieval of an attribute instance
476476
477-
The attribute instance represented by `T`, `C`, `P`, and `N`, and associated with `E` can be retrieved at run-time from the assembly `A` using the following steps:
477+
Using the terms defined in [§22.4.2](attributes.md#2242-compilation-of-an-attribute), the attribute instance represented by `T`, `C`, `P`, and `N`, and associated with `E` can be retrieved at run-time from the assembly `A` using the following steps:
478478
479479
- Follow the run-time processing steps for executing an *object_creation_expression* of the form `new T(P)`, using the instance constructor `C` and values as determined at compile-time. These steps either result in an exception, or produce an instance `O` of `T`.
480480
- For each *named_argument* `Arg` in `N`, in order:
@@ -490,7 +490,8 @@ The attribute instance represented by `T`, `C`, `P`, and `N`, and associated wi
490490
<!-- markdownlint-enable MD028 -->
491491
> *Example*: In an implementation of the CLI, the `Help` attribute instances in the assembly created by compiling the example program in [§22.2.3](attributes.md#2223-positional-and-named-parameters) can be retrieved with the following program:
492492
>
493-
> <!-- Example: {template:"standalone-console", name:"RuntimeAttributeInstanceRetrieval", expectedOutput:["Type : HelpAttribute","Type : InterrogateHelpUrls"], additionalFiles:["HelpAttribute.cs"], executionArgs:["RuntimeAttributeInstanceRetrieval"]} -->
493+
> <!-- Example: {template:"standalone-console", name:"RuntimeAttributeInstanceRetrieval", expectedOutput:["Type : Microsoft.CodeAnalysis.EmbeddedAttribute", "Type : System.Runtime.CompilerServices.NullableAttribute", "Type : System.Runtime.CompilerServices.NullableContextAttribute", "Type : HelpAttribute", "Type : InterrogateHelpUrls"], additionalFiles:["HelpAttribute.cs"], executionArgs:["RuntimeAttributeInstanceRetrieval"]} -->
494+
> <!-- Maintenance Note: The current expectedOutput is based on MS-specific implementation details. -->
494495
> ```csharp
495496
> public sealed class InterrogateHelpUrls
496497
> {

0 commit comments

Comments
 (0)