Open bdkoepke opened 2 years ago
@bdkoepke I'm only just catching up on this issue
Did you find an adequate workaround? Also, please feel free to ask further questions or start discussions here.
Hello, apologies it took so long to respond. No workaround yet.
The code is here: https://github.com/alphaarchitect/BloombergProvider
Description
I'm building a type provider for Bloomberg (they have xml based schema files that describe the entire API). The code-generation part of the API is pretty close to working (there are four primary different types: enums, records, unions, and operations). For the implementation of the record type and union types, I'm trying to improve the API so 'optional' parameters can be specified as the value directly rather than (Some t'). When I change the code from the following:
to
Then I get the error "Specified method is not supported."
The key part is really just the following:
from
to
Wrapping the argument in 'Some' seems to be causing this error.
Expected behavior
I'm trying to generate a type like the following:
Such that the argument is not an "optional" type but the backing field is.
Actual behavior
I get the error "Specified method is not supported."
Known workarounds
I have this working:
But that sucks because now you can only instantiate the Example object by doing:
Rather than
Thank you!
Related information
dotnet 3.1