Closed NickCraver closed 4 years ago
Since craver/aspnetcore is building against netcoreapp3.0+, we can use C# 8 here.
craver/aspnetcore
netcoreapp3.0
I'm doing this as a separate PR for anyone curious. It's broken into 3 commits to illustrate the major wins for Opserver, mainly:
Prop => field ??= Fetch();
Prop => field ?? (field = Fetch());
using
switch
You can browse by commits in this PR to see examples on each of the categories.
Since
craver/aspnetcore
is building againstnetcoreapp3.0
+, we can use C# 8 here.I'm doing this as a separate PR for anyone curious. It's broken into 3 commits to illustrate the major wins for Opserver, mainly:
Prop => field ??= Fetch();
instead ofProp => field ?? (field = Fetch());
using
statements (I don't see this as a huge win in readability except in very few cases)switch
expressions - these make the "decode" cases for translating APIs and statuses much, much more readableYou can browse by commits in this PR to see examples on each of the categories.