Flutter & .NET Blog

Expert insights on Flutter, Dart, and .NET development

How to Use and Unit Test ILogger

How to Use and Unit Test ILogger

ILogger is at the heart of the ASP.NET Core infrastructure and works well when you use it correctly. If you approach it the wrong way, it is easy to go down a rabbit hole and burn lots of time trying to implement basic functionality. Follow these tips instead. This article gives you the basics on how to use and verify mocked calls without having to implement a class yourself. Here are some pointers in case you’ve been doing it wrong. Read on to understand the justification for these tips. Only use ILogger or ILoggerFactory in your implementations. Avoid making direct API calls to the logging library Use an off-the-shelf library. Don’t create a class that implements ILogger unless you explicitly want to build your own logging infrastructure.  Choose the library based on the logging infrastructure you choose to use. You...
Christian Findlay Christian Findlay Jul 03, 2020
RestClient.Net 4

RestClient.Net 4

RestClient.Net is a cross-platform rest-client for .NET Core, .NET Framework, iOS, Android, WASM and UWP. It puts a wrapper over the .NET HttpClient API and allows...
Christian Findlay Christian Findlay Jun 17, 2020