MEF Supports metadata to be passed in addition to Contracts. As we have already discussed some of the interesting catalogs present in MEF base class library, lets take a look how metadata can be transferred in the MEF system. We generally use MetaData to determine something regarding the type. Probably when the actual object is […]
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 […]
MEF supports an opt-in feature that allows recomposition of the Import when the underlying object is changed either explicitely by the user or in the Catalog. The Recomposable Import unit is called live import as it automatically changes the object cycle when actual underlying object is changed. Today I will discuss how exactly this works […]
Lazy is a class that defer the object creation when it is actually needed. MEF supports the Lazy implementation internally. The Lazy type actually wraps around a type and creates the object of the type when the object is actually needed and used. I have written a post on Lazy implementation in .NET few months […]
Managed Extensibility Framework as of now is a new model that deals with Extensibility in application by giving you a standard set of rules by which the vendor who exports components can be related easily to the vendors that imports software components. Hence MEF rules as a standard way of defining extensibility in application.
As we are moving ahead we have already discussed the notion and usage of TypeCatalog, AssemblyCatalog or DirectoryCatalog, in this post I am going to discuss one more Complex Catalog Type that is already present in MEF Base class Library. The AggregateCatalog is a combination of 2 or more catalog and forms a unified Parts […]
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. […]
MEF is a component defined in Base class library for extensibility. If you are really looking for writing something that extend itself at runtime, or that supports plugins to be attached to it, you should give MEF a try. You can read how MEF works from my post here. In this post I will demonstrate […]
In MEF world, we use Types to define Export or Import. Catalogs are used to discover types in an assembly, Directory, or manually added types in TypeCatalogs. Today I will discuss how TypeCatalog works and how you can use it in your application. TypeCatalog is actually a repository of Types that forms the basic Export […]
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 […]
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 […]
Complex numbers are not new to numeral system. A complex number contains one real part and another imaginary part. We can easily implement such a Type, but with .NET 4.0 System.Numerics.dll contains a new Type (struct) called Complex which deals with Complex numbers .