How co-it/csharpfunctionalextensions.httpresults works
Main Components Identification
The system consists of three primary components:
• Core Library
• Source Generator
• Example/Test Projects
Specific Elements
a) Core Library Section:
[Result Extensions]
• ToStatusCodeHttpResult
• ToJsonHttpResult
• ToOkHttpResult
• Other HTTP Result Types
b) Generator Section:
[Source Generator]
• Templates
• Result<T,E>
• UnitResult<E>
• Rules
• DuplicateMapperRule
• EmptyMapGetterRule
c) Error Handling Flow:
[Custom Error] ──► [Error Mapper] ──► [HTTP Result]
Additional Details
• The relationship between custom errors and their mappers
• The source generation process
• How the Result types map to HTTP results
Notes for Implementation
• Keep the abstraction level high enough to show the architecture but detailed enough to understand the flow
• Version information and supported .NET versions
• Notes about the RFC compliance for ProblemDetails