Sometimes, the incoming data in JSON has some custom form that is not supported by the built-in Json.NET converters. In this article, as an educational example, we will implement a custom converter from UNIX time format in milliseconds to the native .NET class
Continue reading Implementing custom Json.NET converter
Once, I was needed to have a simple endpoint in which I can send any request in test purposes. Just a simple web service that eats a request, no matter what HTTP method and route are used.
Fortunately, Microsoft did a great job making ASP.NET Core as flexible as possible, so the solution turned up quite short and simple.
Continue reading Dumping any requests in ASP.NET Core 2.0
Just posted a new article on Binary-Studio Blog about new feature of C# 7.0 syntax – pattern matching.
Here is a simple implementation of the shared Logger (based on NLog) that can be easily included into any solution with minimum configuration.
Continue reading Implementing shared logger
I’d like to introduce a library for accessing app settings in the App.config and Web.config. Unlike standard
ConfigurationManager, ConfigEx additionally allows reading configs of other assemblies used in the project. Moreover, it is strongly typed, has a mechanism of settings overriding and allows apply automatic conversion of values.
Continue reading ConfigEx 2.1.0
Have you ever had a task to read and deserialize a large XML file? Like 500 MB, that is impossible just to read to the end and parse. I’ve faced such problem having an XML that looks like the following:
<?xml version="1.0" encoding="UTF-8"?>
<record id="0" Text="Some text for record 0" />
<record id="1" Text="Some text for record 1" />
<record id="2" Text="Some text for record 2" />
<record id="3" Text="Some text for record 3" />
<record id="1000000" Text="Some text for record 1000000" />
Continue reading Reading large XML files
Just and interesting note that I’ve found while updating the ConfigEx library: the assembly DLL file in ASP.NET application might be located in place different from what we expect. During runtime it is actually not in the place where application is hosted.
Continue reading Assembly location in ASP.NET