-
Notifications
You must be signed in to change notification settings - Fork 135
Blazor WebAssembly support: added try-catch for unsupported properties #274
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
Conversation
Just a thought. Could/should we exclude these properties from compilation for different platforms (multitargeting). Silently catching exceptions may be not optimal. Call to |
I might not exclude them, as they are not excluded from the targeted platform, and it complicates the build process. Perhaps future versions of the platform will support it. But I agree that silently catching exceptions isn't optimal. Here's another idea: perhaps only set these properties if they were set in the options class. Then, if a person was to trying to set one of these properties, they would property receive a |
This will work if the getters for these properties don't throw PNSE. Then you can compare the values and call setters only if values differ. |
I'd prefer this approach, too. |
I'll investigate today what can be done. First, I'll check if the getter can be used. If so, I'll use a comparison to set it. Otherwise, I'll add a field to the options class to track when a property is set and key off that. |
The getter fails on |
What if UseDefaultCredentials was a nullable boolean and only sets the property if it HasValue? And similarly only set the other property if not null? |
@Shane32 Unfortunately, |
Pushed a few more changes:
|
Let's not mix different fixes in one PR. |
Yes, possible. You just need to clearly reflect this issue in the documentation/faq. |
Ok. Which doc do I need to amend? |
This reverts commit 9ee1543.
Reverted. Will file new issue and submit new PR. |
I see.
Agreed |
Readme.md |
Added a note on Blazor WebAssembly limitations to ReadMe.md. |
I missed this earlier. Looks like you’ve got it all figured out! 👍 |
Let me know if anything else is needed to merge this change. |
Addresses remaining compatibility issues for Blazor WebAssembly support (see #262)