Working with OxyPlot sometimes throw these interesting problems, mainly due to lack of documentation. One of the recent challenges involved creating a custom tooltip, which at the hindsight, was pretty straightforward - only if the developers had continued their effort in completing the documentation. Alright back to out problem. Oxyplot, by default provides a … Continue reading Custom Tooltip in Oxyplot
Linq : Significance of AsEnumerable
While LINQ provides a big umbrella to query in-memory as well as remote collections alike (part of the benefit is having a standard vocabulary to query any collection), there are subtle differences, which rises from the way the two classes of Linq queries work. A Linq query over in-memory collections usually work over the IEnumerable … Continue reading Linq : Significance of AsEnumerable
Code Smells : Dispensable
Continuing on our discussion on Code Smells and Refactoring techniques, we will discuss Dispensable in this post. Dispensables are avoidable components whose absence would make the code much more cleaner, readable and efficient. Comments A joke is not a good one if needed to be explained. A similar philosophy holds for code as well. If … Continue reading Code Smells : Dispensable
Design Pattern : Memento Pattern
Memento Design Pattern allows to capture internal state of an object in an external object and restore it to the desired checkpoint when required, all the while being in compliance with encapsulation. The Memento Design Pattern comprises of 3 actor classes. Originator : The class which needs to have the ability to store its internal … Continue reading Design Pattern : Memento Pattern
Quick Intro to Protobuf
Protobuf-net is a .net adaption of Google's Protocol Buffers and is generally considered to be a really fast serialization/deserialization library. The target serializable classes are decorated with mainly 3 attributes. ProtoContract The target class is decorated with the ProtoContract attributes, indicating that the class can be serialized. ProtoMember(N) The ProtoMember attribute indicates the field that … Continue reading Quick Intro to Protobuf
Pass Property as Expression
I recently needed to pass a property of a class as an expression to a method and read value from it. I found the code that I finally ended up interesting and thought it might be useful to share it here. It might look I could have passed the value directly instead of as an … Continue reading Pass Property as Expression
Sneak Peak at Response Files (.rsp)
The Visual Studio has evolved so much that anyone hardly uses the CSC.exe tool and command line switches any longer. But there could be days when you are forced to opt for CSC.exe and the biggest woe is the huge list of switches/parameters that you need to associate each time you want to compile using … Continue reading Sneak Peak at Response Files (.rsp)
Oxyplot and DateTime Axis
Anyone who has just been introduced to OxyPlot and had to deal with a graph comprising of a Time/DateTime axis might find themselves in a corner. The first thing you would notice is that the DataPoint structure accepts only double and that means trouble, especially with a not-so-exhaustive documentation the tool supports. But if you … Continue reading Oxyplot and DateTime Axis
Stairway Pattern
How do you feel when you invite your friend for a private family function and he brings along a dozen strangers (his friends) ? Entourage Anti-Pattern This is similar to the scenario when you want to add a library as reference and in turn ends up referring a different set of libraries which you … Continue reading Stairway Pattern
CLSCompliant Attribute
While developing a library in .Net which could be used by another programming language than it was originally designed in, it is important to remember that the .Net Languages offers a subset of CLR/CTS while offering a superset of CLS. And, if you want to develop a library that could be used by any programming … Continue reading CLSCompliant Attribute