in C#, public members can be assigned in place of constructor call:
options.TokenValidationParameters = new TokenValidationParameters { NameClaimType = "preferred_username" }
To achieve the same effect, I wrote the following F# code:
options.TokenValidationParameters <- (new TokenValidationParameters()) |> fun it -> (it.NameClaimType <- "preferred_username"; it)
However it doesn't look nice at all.
Is there any better way to do this? An ideal solution may be a function like apply in kotlin?
Any help is appreciated.