| | | 1 | | namespace NexusLabs.Needlr.Generators.Models; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Simplified type information for diagnostic output (DependencyGraph, LifetimeSummary, RegistrationIndex). |
| | | 5 | | /// Used for cross-assembly type aggregation where we don't need full symbol information. |
| | | 6 | | /// </summary> |
| | | 7 | | internal readonly struct DiagnosticTypeInfo |
| | | 8 | | { |
| | | 9 | | public DiagnosticTypeInfo( |
| | | 10 | | string fullName, |
| | | 11 | | string shortName, |
| | | 12 | | GeneratorLifetime lifetime, |
| | | 13 | | string[] interfaces, |
| | | 14 | | string[] dependencies, |
| | | 15 | | bool isDecorator, |
| | | 16 | | bool isPlugin, |
| | | 17 | | bool hasFactory, |
| | | 18 | | string? keyedValue, |
| | | 19 | | bool isInterceptor = false, |
| | | 20 | | bool hasInterceptorProxy = false) |
| | | 21 | | { |
| | 18 | 22 | | FullName = fullName; |
| | 18 | 23 | | ShortName = shortName; |
| | 18 | 24 | | Lifetime = lifetime; |
| | 18 | 25 | | Interfaces = interfaces; |
| | 18 | 26 | | Dependencies = dependencies; |
| | 18 | 27 | | IsDecorator = isDecorator; |
| | 18 | 28 | | IsPlugin = isPlugin; |
| | 18 | 29 | | HasFactory = hasFactory; |
| | 18 | 30 | | KeyedValue = keyedValue; |
| | 18 | 31 | | IsInterceptor = isInterceptor; |
| | 18 | 32 | | HasInterceptorProxy = hasInterceptorProxy; |
| | 18 | 33 | | } |
| | | 34 | | |
| | | 35 | | /// <summary>Fully qualified type name including namespace.</summary> |
| | 34 | 36 | | public string FullName { get; } |
| | | 37 | | |
| | | 38 | | /// <summary>Short type name without namespace.</summary> |
| | 152 | 39 | | public string ShortName { get; } |
| | | 40 | | |
| | | 41 | | /// <summary>Service lifetime (Singleton, Scoped, Transient).</summary> |
| | 144 | 42 | | public GeneratorLifetime Lifetime { get; } |
| | | 43 | | |
| | | 44 | | /// <summary>Interfaces implemented by this type.</summary> |
| | 54 | 45 | | public string[] Interfaces { get; } |
| | | 46 | | |
| | | 47 | | /// <summary>Constructor dependencies (type names).</summary> |
| | 18 | 48 | | public string[] Dependencies { get; } |
| | | 49 | | |
| | | 50 | | /// <summary>True if this is a decorator type (has [DecoratorFor] or [OpenDecoratorFor]).</summary> |
| | 72 | 51 | | public bool IsDecorator { get; } |
| | | 52 | | |
| | | 53 | | /// <summary>True if this is a Needlr plugin type.</summary> |
| | 0 | 54 | | public bool IsPlugin { get; } |
| | | 55 | | |
| | | 56 | | /// <summary>True if this type has [GenerateFactory] attribute.</summary> |
| | 86 | 57 | | public bool HasFactory { get; } |
| | | 58 | | |
| | | 59 | | /// <summary>Keyed service value if this type has [Keyed] attribute.</summary> |
| | 0 | 60 | | public string? KeyedValue { get; } |
| | | 61 | | |
| | | 62 | | /// <summary>True if this is an interceptor type (has [Intercept] or is referenced by one).</summary> |
| | 0 | 63 | | public bool IsInterceptor { get; } |
| | | 64 | | |
| | | 65 | | /// <summary>True if this type has an interceptor proxy generated for it.</summary> |
| | 36 | 66 | | public bool HasInterceptorProxy { get; } |
| | | 67 | | } |