Closed KyleMcMaster closed 6 months ago
Package | Line Rate | Branch Rate | Complexity | Health |
---|---|---|---|---|
Ardalis.Result.Sample.Core | 18% | 18% | 63 | ❌ |
Ardalis.Result.FluentValidation | 86% | 50% | 6 | ✔ |
Ardalis.Result | 21% | 0% | 82 | ❌ |
Summary | 23% (95 / 416) | 17% (9 / 54) | 151 | ❌ |
Should we have more options for including correlation ids? And if so, rather than having separate methods for all of them, would it make sense to bake it into a single parameter object, like:
public record ErrorList(IEnumerable<string> ErrorMessages, string? CorrelationId);
?
Then the factory methods would just take in (ErrorList errorList)
and we wouldn't need any overloads or alternate methods.
Should we have more options for including correlation ids? And if so, rather than having separate methods for all of them, would it make sense to bake it into a single parameter object, like:
public record ErrorList(IEnumerable<string> ErrorMessages, string? CorrelationId);
?
Then the factory methods would just take in
(ErrorList errorList)
and we wouldn't need any overloads or alternate methods.
I agree we should try to pass CorrelationId whenever we can, I'll update the methods in a separate PR.
Sample unit test showing behavior