|
1 |
| -using ILSourceParser.Trivia; |
2 |
| -using System.Collections.Immutable; |
3 |
| - |
4 |
| -namespace ILSourceParser.Syntax; |
5 |
| - |
6 |
| -/// <summary> |
7 |
| -/// Represents an anonymous custom attribute in IL code. This is a type of |
8 |
| -/// custom attribute that does not contain any byte data. Example: |
9 |
| -/// <code> |
10 |
| -/// .custom instance void [System.Runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor() |
11 |
| -/// |
12 |
| -/// // There is no "= ( 01 00 00 00 )" after "::.ctor()", so this is an anonymous |
13 |
| -/// // custom attribute. |
14 |
| -/// </code> |
15 |
| -/// There is a different syntax node to represent custom attributes that contain |
16 |
| -/// byte data, which is <see cref="CustomAttributeSyntax"/>. |
17 |
| -/// </summary> |
18 |
| -public class AnonymousCustomAttributeSyntax : BaseCustomAttributeSyntax |
19 |
| -{ |
20 |
| - /// <summary> |
21 |
| - /// Represents the invocation to the constructor. For example, in this |
22 |
| - /// custom attribute: |
23 |
| - /// <code> |
24 |
| - /// .custom instance void [System.Runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor() |
25 |
| - /// </code> |
26 |
| - /// .. this property will hold a reference to <c>[System.Runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor()</c>, |
27 |
| - /// specifically the constructor method <c>.ctor()</c>, and the |
28 |
| - /// return type <c>instance void</c>. |
29 |
| - /// </summary> |
30 |
| - public MethodCallSyntax AttributeConstructorTarget { get; init; } |
31 |
| - |
32 |
| - internal AnonymousCustomAttributeSyntax( |
33 |
| - ImmutableArray<SyntaxTrivia> leadingTrivia, |
34 |
| - ImmutableArray<SyntaxTrivia> trailingTrivia, |
35 |
| - MethodCallSyntax attributeConstructorTarget) : base(leadingTrivia, trailingTrivia) |
36 |
| - { |
37 |
| - AttributeConstructorTarget = attributeConstructorTarget; |
38 |
| - } |
39 |
| -} |
| 1 | +using ILSourceParser.Trivia; |
| 2 | +using System.Collections.Immutable; |
| 3 | + |
| 4 | +namespace ILSourceParser.Syntax; |
| 5 | + |
| 6 | +/// <summary> |
| 7 | +/// Represents an anonymous custom attribute in IL code. This is a type of |
| 8 | +/// custom attribute that does not contain any byte data. Example: |
| 9 | +/// <code> |
| 10 | +/// .custom instance void [System.Runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor() |
| 11 | +/// |
| 12 | +/// // There is no "= ( 01 00 00 00 )" after "::.ctor()", so this is an anonymous |
| 13 | +/// // custom attribute. |
| 14 | +/// </code> |
| 15 | +/// There is a different syntax node to represent custom attributes that contain |
| 16 | +/// byte data, which is <see cref="CustomAttributeSyntax"/>. |
| 17 | +/// </summary> |
| 18 | +public class AnonymousCustomAttributeSyntax : BaseCustomAttributeSyntax |
| 19 | +{ |
| 20 | + /// <summary> |
| 21 | + /// Represents the invocation to the constructor. For example, in this |
| 22 | + /// custom attribute: |
| 23 | + /// <code> |
| 24 | + /// .custom instance void [System.Runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor() |
| 25 | + /// </code> |
| 26 | + /// .. this property will hold a reference to <c>[System.Runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor()</c>, |
| 27 | + /// specifically the constructor method <c>.ctor()</c>, and the |
| 28 | + /// return type <c>instance void</c>. |
| 29 | + /// </summary> |
| 30 | + public MethodCallSyntax AttributeConstructorTarget { get; init; } |
| 31 | + |
| 32 | + internal AnonymousCustomAttributeSyntax( |
| 33 | + ImmutableArray<SyntaxTrivia> leadingTrivia, |
| 34 | + ImmutableArray<SyntaxTrivia> trailingTrivia, |
| 35 | + MethodCallSyntax attributeConstructorTarget) : base(leadingTrivia, trailingTrivia) |
| 36 | + { |
| 37 | + AttributeConstructorTarget = attributeConstructorTarget; |
| 38 | + } |
| 39 | +} |
0 commit comments