In the .NET Core world most configuration has gone "fluent". The idea is
elegant enough, in that you write an extension method for some basic class
of config options and it joins the other ones that are available (if you
have the right usings). There's a terrible side effect of the lovely fluent
elegance ... I can't find any friggin' option without a Google search. It
just took me 20 minutes fumbling with intellisense and searching to find
this single statement. The option I wanted was obsolete and didn't appear
in intellisense, so I had to F12 into the source and discover it had been
renamed.

builder.Services.Configure<JsonOptions>(jopts =>
jopts.JsonSerializerOptions.DefaultIgnoreCondition =
JsonIgnoreCondition.WhenWritingNull);

And this is just a simple case. Sometimes the fluency is nested so A => B
=> C.Foo deep that you've got more chance of finding a gold nugget than
finding the option you want.

Here endeth the rant, but I could go all day if you want.

*Greg K*

Reply via email to