-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discriminated Union exposed by FountainDocument.Blocks is not C# friendly #22
Comments
Probably we should not have exposed the |
@gabor-nemeth Thanks for the clarification. I'm reading up on F# to try to understand exactly what would be required to get what I'm looking for. Current options seem to be I'd definitly prefer option 1 even if it requires learning some F#! |
@BenBtg 👍 It's not that much of work to achieve option 1. You can add helper functions to |
I will work towards option 1 then and plan to send a PR as soon as I have something. |
I'm having some trouble trying to use the FountainBlockElements exposed by the FountainDocument.
As C# dev with no F# experience attempting to use the API. I'm struggling to deference the weak types exposed in my Xamarin.Forms app.
I don't understand the exactly what the problem is but the types returned all derive from FountainBlockElement have item1, item2, etc.. instead of strongly typed members.
According to my research discriminated unions should not be exposed to C# as per the F# guidlines.
For more info
https://stackoverflow.com/questions/23843142/f-discriminated-union-usage-from-c-sharp
I will see if I can work out the solution and provide a PR if possible.
The text was updated successfully, but these errors were encountered: