typestar

The open ecosystem

16 steps in 7 sets of C#.

Half of working C# was never written at Microsoft. Newtonsoft.Json was one developer's side project that became the most downloaded package on NuGet. Dapper was built inside Stack Overflow to make its SQL fast and stayed open when it left. Serilog, Polly, xunit, CsvHelper, Spectre.Console — the libraries in this tour are community projects with their own maintainers, their own opinions, and in several cases APIs so good Microsoft later imitated them.

Each set here is a working introduction to one library: Newtonsoft's dynamic JSON, Dapper's SQL mapping, Serilog's structured events, Polly's retries and timeouts, and the testing pair of xunit and Shouldly. Every seed compiles against the real packages, restored from NuGet, so what you type is what these libraries actually accept.

Start this tour

JSON with Newtonsoft

  • JObjectNewtonsoft's dynamic view of JSON: parse, read, patch, write.
  • JsonConvertThe serializer that carried .NET JSON for a decade.
  • LINQ to JSONQuery the JSON tree itself, before any classes exist.

Data with Dapper

Logging with Serilog

Resilience with Polly

  • Retry policiesTransient failure, meet declarative persistence.
  • TimeoutsA deadline the callback cannot talk its way out of.

Testing

  • FactsA test is a method with an attribute; xunit finds the rest.
  • TheoriesOne test body, many cases.
  • ShouldlyAssertions that read forward and fail with the actual values.

Console & text

Encore

The other C# tours