I noticed that MapResult does not have an overload for ParserResult<T>
. Is there a way to perform the same function that MapResult provides, and return a ParserResult<T>
rather than just an object or would I have to clone the repo and add this feature myself to the extensions class?
Let me explain what I am trying to do. I need to map old options to new models. So rather than change the deployed signatures everywhere, I just want to map the old model to the new model and still use the ParserResult<T>
as per usual. The issue I see is that I can map the old model to the new model using MapResult, but then I need to return the ParserResult<T>
for the new model. All the constructors for the ParserResult<T>
are internal and include sealed parameters. So I can't just new up a ParserResult<T>
.
What options do you propose to perform something like this? It would seem like I would not be the only one requiring something like this. I would rather not have to clone the repo to add this feature.
Solutions?
Thanks