AutoMapper is undoubtedly the most popular object to object mapping library used around and it wouldn't be a surprise to know if any of us, including yours truly, have even tried out alternatives. I recently tried out Mapster and was quite surprised by the results. Even they did mention their Github pages about being faster than Automapper, I honestly didn't believe … Continue reading Automapper vs Mapster
Category: Frameworks & Libraries
Development using different Frameworks and Libraries
Retrieve DataPoints displayed using Oxyplot when Zooming or Panning
One of questions I recently saw in Stackoverflow involved Oxyplot. User wanted to obtain the points which are currently displayed on screen. Remember, like with most graph controls, User could zoom/pan with Oxyplot and the points which are currently visible could only be a subset of actual points in the series. This could be achieved … Continue reading Retrieve DataPoints displayed using Oxyplot when Zooming or Panning
Oxyplot : Selectable Point
While OxyPlot continues to be one of the attractive plotting library for .Net developers, there are times when you find longing for features that could make it even more better. One of such feature is ability to select/highlight a point in a series. While there is a Selectable Property with LineSeries, it doesn't quite let … Continue reading Oxyplot : Selectable Point
Json Recipies – Part 2
Continuing with our earlier post on Json Recipies, let's explore couple of quick reference recipes using the famous NewtonSoft.Json. Recipe 04: Deserialize to Anonymous Type One of the least explored feature in NewtonSoft is the ability to deserialize a Json to anonymous type. For example, This would produce an output as Isn't that quite useful. … Continue reading Json Recipies – Part 2
Exploring Randomize.Net
Randomize.Net provides an easy and lightweight extensions for System.Random for creating random instances of any given Type T, with generated random value. This can be highly useful for generating POCO's to test your sample code, including LINQ queries against. The API has been designed to make it extremely simple and devoid of any complex syntax. … Continue reading Exploring Randomize.Net
Caliburn.Micro #008: Gesture Recognition using Short-Hand Syntax
In this part of Caliburn.Micro tutorials we would explore how to configure and use Gesture Recognition with Caliburn.Micro, particularly exploiting the Short-Hand syntax for Actions. Caliburn.Micro doesn't support this out of the box, so obviously we need to work around the Actions to provide support for Gestures. Let's first formulate the syntax of how we … Continue reading Caliburn.Micro #008: Gesture Recognition using Short-Hand Syntax
Mapping XML Using Automapper
Automapper comes handy when you have to deal with a lot of DTOs, making it very easy to map one type to another. But there are situations where you might need an extra hand. Consider the following Type definitions. The Source.Address is a XML representation of Address. Your requirement is to configure Automapper to convert … Continue reading Mapping XML Using Automapper
Json Recipes
Here are few quick recipes with Newtonsoft.Json Recipe 01 : Convert Json to XML One way to convert a Json to XML would be to convert Json to intermediate class structure and then serialize the class using XMLSerializer. But why go the long way when you can do it directly. Let's check the code straightaway. … Continue reading Json Recipes
Lazy Cache
Recently came across this small but highly effective caching library called LazyCache. While I have been familiar with the in-memory caching functionalities of .Net such as ObjectCache and MemoryCache, LazyCache provides a neat threadsafe wrapper around the conventional options. It also make sure you don't need to implement the Cache Aside pattern yourself as the … Continue reading Lazy Cache
Caliburn.Micro #006 : Event Aggregators & Window Managers
Consider the classic scenario when you need to show the currently logged in User Name in your main Window, once you have successfully logged in. The The login Window is supposed to be a Modal Dialog, and isn't remotely aware of the Label displaying Username in the Main Window. WPF handles Modal Dialogs and messaging … Continue reading Caliburn.Micro #006 : Event Aggregators & Window Managers