| | | 1 | | namespace NexusLabs.Needlr.Catalog; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Represents a service registration discovered at compile time. |
| | | 5 | | /// </summary> |
| | | 6 | | /// <param name="TypeName">The fully qualified name of the implementation type.</param> |
| | | 7 | | /// <param name="ShortTypeName">The short name of the implementation type (without namespace).</param> |
| | | 8 | | /// <param name="AssemblyName">The assembly name where this type is defined.</param> |
| | | 9 | | /// <param name="Lifetime">The service lifetime (Singleton, Scoped, Transient).</param> |
| | | 10 | | /// <param name="Interfaces">The interfaces this type is registered as.</param> |
| | | 11 | | /// <param name="ConstructorParameters">Constructor parameter type names.</param> |
| | | 12 | | /// <param name="ServiceKeys">Service keys if registered as keyed service.</param> |
| | | 13 | | /// <param name="SourceFilePath">Source file path where the type is defined, if available.</param> |
| | | 14 | | public sealed record ServiceCatalogEntry( |
| | | 15 | | string TypeName, |
| | | 16 | | string ShortTypeName, |
| | | 17 | | string AssemblyName, |
| | | 18 | | ServiceCatalogLifetime Lifetime, |
| | | 19 | | IReadOnlyList<string> Interfaces, |
| | | 20 | | IReadOnlyList<ConstructorParameterEntry> ConstructorParameters, |
| | | 21 | | IReadOnlyList<string> ServiceKeys, |
| | | 22 | | string? SourceFilePath = null); |
| | | 23 | | |
| | | 24 | | /// <summary> |
| | | 25 | | /// Represents a constructor parameter. |
| | | 26 | | /// </summary> |
| | | 27 | | /// <param name="Name">The parameter name.</param> |
| | | 28 | | /// <param name="TypeName">The fully qualified type name of the parameter.</param> |
| | | 29 | | /// <param name="IsKeyed">True if this is a keyed service parameter.</param> |
| | | 30 | | /// <param name="ServiceKey">The service key if this is a keyed parameter.</param> |
| | 399 | 31 | | public sealed record ConstructorParameterEntry( |
| | 0 | 32 | | string Name, |
| | 0 | 33 | | string TypeName, |
| | 0 | 34 | | bool IsKeyed = false, |
| | 399 | 35 | | string? ServiceKey = null); |
| | | 36 | | |
| | | 37 | | /// <summary> |
| | | 38 | | /// Service lifetime as discovered at compile time. |
| | | 39 | | /// </summary> |
| | | 40 | | public enum ServiceCatalogLifetime |
| | | 41 | | { |
| | | 42 | | Singleton, |
| | | 43 | | Scoped, |
| | | 44 | | Transient |
| | | 45 | | } |