-
Notifications
You must be signed in to change notification settings - Fork 832
Unable to use certain classes from .NET #16870
-
Microsoft.AspNetCore.Components.NavigationOptions is available for F# through nuget package, yet attempting to construct the object in fsharp is impossible due to it looking like this
///<summary> /// Additional options for navigating to another URI. /// </summary> [<Struct>] type NavigationOptions = val ``<ForceLoad>k__BackingField`` : bool val ``<HistoryEntryState>k__BackingField`` : string val ``<ReplaceHistoryEntry>k__BackingField`` : bool ///<summary> /// If true, bypasses client-side routing and forces the browser to load the new page from the server, whether or not the URI would normally be handled by the client-side router. /// </summary> member ForceLoad: bool ///<summary> /// Gets or sets the state to append to the history entry. /// </summary> member HistoryEntryState: string ///<summary> /// If true, replaces the currently entry in the history stack. /// If false, appends the new entry to the history stack. /// </summary> member ReplaceHistoryEntry: bool
Making interop to blazor from F# really difficult all the sudden
Beta Was this translation helpful? Give feedback.
All reactions
You can, unless I'm missing something
Replies: 1 comment 1 reply
-
You can, unless I'm missing something
image
Beta Was this translation helpful? Give feedback.
All reactions
-
You are correct. I used Visual Studio's intellisense to learn what I can do but I didn't know I can do it this way, it's my problem
I attempted to :
let x = NavigationOptions() x.ForceLoad <- true
The initial impression I received for seeing an F# struct without mutable fields/properties and having no constructor shocked me
Beta Was this translation helpful? Give feedback.