Tag Archives: csharp



Working with CompositionBatch in MEF

CompositionBatch is a new type introduced with MEF library that allows you to individually deal with Part instances. Generally when we are in a situation that we need to manually handle certain type, or more precisely when we need to create the types manually ourselves, it is recommended to use CompositionBatch. Basically you thing think […]

Working with DirectoryCatalog in MEF

As I have already discussed some of the Catalogs present in MEF library viz, TypeCatalog, AssemblyCatalog etc, where AssemblyCatalog is actually a collection of TypeCatalog internally, DirectoryCatalog on the other hand is a collection of AssemblyCatalog. In this post I will look into DirectoryCatalog and how to use this class while writing your MEF application. […]

Initialize assemblies using PreApplicationStartMethod for ASP.NET 4.0 Application

Sometimes your ASP.NET application needs to hook up some code before even the Application is started. Assemblies supports a custom attribute called PreApplicationStartMethod which can be applied to any assembly that should be loaded to your ASP.NET application, and the ASP.NET engine will call the method you specify within it before actually running any of […]

Async Lambda Expression

Do you know what is coming next to C#? Asynchronous programming is really made easy with the inclusion of new contextual keywords to C# namely async and await. If you are unaware of it, I would really suggest you to read few of my posts like : C# 5.0 vNext Async support for Silverlight and […]