[responsive-menu menu="HamburgerMenu"]

Awaitable WCF calls with TaskCompletionSource

  A nice little gem of the TPL is the TaskCompletionSource. It creates a Task you can control from outside the task. Example : I create a new TaskCompetionSource : var tcs = new TaskCompletionSource(); I get the Task from it : tcs.Task I can set the Task result this way : tcs.TrySetResult(true); You can set an exception like this : tcs.TrySetException(new [...]

About SelectMany…

  SelectMany is one of the most unused Linq operator, but one of the most powerful. It look like scary at first, but it is a beast easy to tame. What is it doing? Well, basically, it flattens collections. A little example will make it very clear. For those example, I’ll use an invaluable tool for linq : LinqPad . A must have for serious Linq developers. We’ll [...]

Rx Reactive Framework 101 (Part I)

Introduction A little bit by chance, I heard about a new Reactive Framework for .NET. I was a little bit curious, and the least you can say is I wasn’t disappointed at all ! It is a Push model framework using IObservable, the opposite to the good old Pull model of IEnumerable. To install the framework, you can use NuGet or from the Rx team website. A [...]

MEF 101 : Part II (Silverlight)

Introduction In the part I, I talked about the basic of MEF. Now, I will show you some Silverlight-specific feature of that nice framework. When I was playing around, I wondered if there was an easy way to have a download on demand of the parts. In WPF, we can consider the parts are installed on the hard drive. With Silverlight, we have the internet [...]

MEF 101 : Part I

Introduction After a session I followed in TechEd 2010, and the release of PRISM 4.0, it was time for me to really get into Managed Extensibility Framework. So here is a little article that sums up my experience using it. The basics The idea of MEF is to have an easy plugin (called parts) system for .NET. We can divide MEF in 3 parts : Export : The [...]