| | | 1 | | using System.Collections.Generic; |
| | | 2 | | |
| | | 3 | | namespace NexusLabs.Needlr.Generators.Models; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Information about a positional record's primary constructor parameters. |
| | | 7 | | /// </summary> |
| | | 8 | | internal readonly struct PositionalRecordInfo |
| | | 9 | | { |
| | | 10 | | public PositionalRecordInfo( |
| | | 11 | | string shortTypeName, |
| | | 12 | | string containingNamespace, |
| | | 13 | | bool isPartial, |
| | | 14 | | IReadOnlyList<PositionalRecordParameter> parameters) |
| | | 15 | | { |
| | 9 | 16 | | ShortTypeName = shortTypeName; |
| | 9 | 17 | | ContainingNamespace = containingNamespace; |
| | 9 | 18 | | IsPartial = isPartial; |
| | 9 | 19 | | Parameters = parameters; |
| | 9 | 20 | | } |
| | | 21 | | |
| | | 22 | | /// <summary>The simple type name (without namespace).</summary> |
| | 14 | 23 | | public string ShortTypeName { get; } |
| | | 24 | | |
| | | 25 | | /// <summary>The containing namespace.</summary> |
| | 7 | 26 | | public string ContainingNamespace { get; } |
| | | 27 | | |
| | | 28 | | /// <summary>Whether the record is declared as partial.</summary> |
| | 18 | 29 | | public bool IsPartial { get; } |
| | | 30 | | |
| | | 31 | | /// <summary>The primary constructor parameters.</summary> |
| | 17 | 32 | | public IReadOnlyList<PositionalRecordParameter> Parameters { get; } |
| | | 33 | | } |