WebSharper 4.1.2
WebSharper 4.1.2.178
New features
- #874 WebSharper for C# now supports syntax introduced in C# 7.2:
in
arguments andref readonly
returns, non-trailing named arguments, numeric literals with leading underscores,private protected
.
Fixes/improvements
- #884 WebSharper build errors and warnings in F# projects now show up correctly in Errors window and as squiggly underlines.
- #883 Fixed deserializing an empty
Set
value sent to aRemote
function. - #883
Map
andSet
values with any key type can now be serialized into JSON withJson.Serialize
. Maps are stored as a flat list of key/value pairs.Map<string>
still serializes to a single JSON object. - #871 C# inferred routers now respect HTTP methods same as F#: declared either by the
Method
attribute or likeEndPoint("POST /post")
- #871 Multiple
EndPoint
attributes can be used on types and members. Equivalently, theEndPoint
attribute can be passed multiple string arguments. In the case of multiple attributes, they can be ordered by setting theorder
parameter of theEndPoint
attibute contructor. - #871 C# subclasses used in inferred routers have the option to declare the full route to parse/write, not inheriting from base class by having
inheritRoute: false
on anEndPoint
attribute, - #870
EndPoint "/"
can be used on a union case with fields (for example another union, allowing breaking up a big endpoint definition into multiple union types) - #873 Decoding/encoding string values by
Router.Infer
(andRouter.rString
) are now using the same logic as WebSharper 4.0: any non-alphanumeric character replaced to~xx
or~uxxxx
. This ensures that string values are recovered properly and are passing standard URL correctness checks.