The topic of the contracts definition and how the programmer can do it in the safest way and guarantee that who will use the contract will do that in the right way is a common and complex argument. In the development phase the preconditions are fundamentals to check that the parameters allowed in our contract... Continue Reading →
Generic object factory for classes with non public constructor in C#
In this post I want to talk about a common need that we could have in an applications, that is an object factory. Of course, we could have different requirements about the implementation of it, but the most widespread is a generic factory like this: This is a very simple implementation, but with the new... Continue Reading →
Using adapter pattern to parse HTML with C# and AgilityPack
Recently I faced with a business requirement about extracting informations from some html pages and display them in a local application. The principal problem that I found was that the result were in html format and I needed to transform that in a c# object, in order to be able to manage the informations in... Continue Reading →