Skip to content

WebSharper 4.1.2

Compare
Choose a tag to compare
@Jand42 Jand42 released this 16 Jan 14:52
· 1673 commits to master since this release

WebSharper 4.1.2.178

New features

  • #874 WebSharper for C# now supports syntax introduced in C# 7.2: in arguments and ref 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 a Remote function.
  • #883 Map and Set values with any key type can now be serialized into JSON with Json.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 like EndPoint("POST /post")
  • #871 Multiple EndPoint attributes can be used on types and members. Equivalently, the EndPoint attribute can be passed multiple string arguments. In the case of multiple attributes, they can be ordered by setting the order parameter of the EndPoint 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 an EndPoint 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 (and Router.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.