| | | 1 | | namespace NexusLabs.Needlr.Generators.Models; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Information about a discovered named HttpClient options type (from [HttpClientOptions]). |
| | | 5 | | /// </summary> |
| | | 6 | | internal readonly struct DiscoveredHttpClient |
| | | 7 | | { |
| | | 8 | | public DiscoveredHttpClient( |
| | | 9 | | string typeName, |
| | | 10 | | string clientName, |
| | | 11 | | string sectionName, |
| | | 12 | | string assemblyName, |
| | | 13 | | HttpClientCapabilities capabilities, |
| | | 14 | | string? sourceFilePath = null) |
| | | 15 | | { |
| | 0 | 16 | | TypeName = typeName; |
| | 0 | 17 | | ClientName = clientName; |
| | 0 | 18 | | SectionName = sectionName; |
| | 0 | 19 | | AssemblyName = assemblyName; |
| | 0 | 20 | | Capabilities = capabilities; |
| | 0 | 21 | | SourceFilePath = sourceFilePath; |
| | 0 | 22 | | } |
| | | 23 | | |
| | | 24 | | /// <summary>Fully qualified type name of the options class (e.g., "global::MyApp.WebFetchHttpClientOptions").</summ |
| | 0 | 25 | | public string TypeName { get; } |
| | | 26 | | |
| | | 27 | | /// <summary>The resolved HttpClient name used for <c>services.AddHttpClient("Name", ...)</c>.</summary> |
| | 0 | 28 | | public string ClientName { get; } |
| | | 29 | | |
| | | 30 | | /// <summary>The resolved configuration section name (e.g., "HttpClients:WebFetch").</summary> |
| | 0 | 31 | | public string SectionName { get; } |
| | | 32 | | |
| | 0 | 33 | | public string AssemblyName { get; } |
| | | 34 | | |
| | | 35 | | /// <summary>Which capability interfaces the type implements — drives conditional emission.</summary> |
| | 0 | 36 | | public HttpClientCapabilities Capabilities { get; } |
| | | 37 | | |
| | 0 | 38 | | public string? SourceFilePath { get; } |
| | | 39 | | } |