~ruther/NosSmooth

ref: 7f45f96e9a0ff9e0c0110b6184eb41aee91667af NosSmooth/Core/NosSmooth.PacketSerializersGenerator/Data/AttributeInfo.cs -rw-r--r-- 1.4 KiB
7f45f96e — František Boháček refactor: split string converters 3 years ago
                                                                                
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
//
//  AttributeInfo.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

using Microsoft.CodeAnalysis.CSharp.Syntax;

namespace NosSmooth.PacketSerializersGenerator.Data;

/// <summary>
/// The attribute info.
/// </summary>
/// <param name="Attribute">The attribute syntax.</param>
/// <param name="FullName">The full name of the attribute containing namespace.</param>
/// <param name="IndexedAttributeArguments">The indexed arguments passed to the attribute.</param>
/// <param name="NamedAttributeArguments">The named arguments passed to the attribute.</param>
public record AttributeInfo
(
    AttributeSyntax Attribute,
    string FullName,
    IReadOnlyList<AttributeArgumentInfo> IndexedAttributeArguments,
    IReadOnlyDictionary<string, AttributeArgumentInfo> NamedAttributeArguments
);

/// <summary>
/// The attribute argument information.
/// </summary>
/// <param name="Argument">The argument syntax.</param>
/// <param name="IsArray">Whether the attribute argument is an array.</param>
/// <param name="RealValue">The real parsed value of the argument.</param>
/// <param name="VisualValue">The visual value of the argument.</param>
public record AttributeArgumentInfo(AttributeArgumentSyntax Argument, bool IsArray, object? RealValue, string VisualValue);
Do not follow this link