Monthly Archives: January 2012

WCF with async await logic

I found this very interesting post to get a Task<T> from a WCF call. I change it a little bit to fix a bug and to allow usage of async / await using AsyncCtpLibrary. So I propose this implementation: public static class TaskFactoryExtensions … Continue reading

Posted in 10369, 11417, 16710, 7671 | Leave a comment

WPF/SL: lazy loading TreeView

01/26/2012: Code update Imagine the following scenario: you have a WCF service with two methods: List<Customer> GetCustomers(); List<Order> GetOrders(int CustomerId); You want a treeview with lazy loading in a WPF Window. There is many way to do it. I identify … Continue reading

Posted in 13461, 7671, 8708 | 2 Comments

SL5 with AsyncCtp: The type ‘System.Threading.Tasks.Task’ exists in both mscorlib.dll and AsyncCtpLibrary_Silverlight.dll

If you use AsyncCtp With SL5, you could have the following issue: The type ‘System.Threading.Tasks.Task’ exists in both mscorlib.dll and AsyncCtpLibrary_Silverlight.dll. So you can’t compile your project if you use Task class! In this case, you could use an alias … Continue reading

Posted in 13461, 16710 | 2 Comments

Coding for fun: Write your code in comments with Roslyn

Sometimes, you have some very basic methods and you could find useless to comment them but sometimes you have to comment them in order to generate help file. Some tools allow you to generate comments using the method signature. For … Continue reading

Posted in 16402, 7671, 7672 | 6 Comments