Over 2 years ago when I got intreduced to C# 2.0 and generics I wrote an Extensibility Application Block. The simple usage looks like this:
IExtensibleHost host = new SingleAppDomainHost();
IExtensibleTypeLoader loader = new AssemblyTypeLoader(System.Reflection.Assembly.GetEntryAssembly());
Plugins.IPlugable[] plugins = host.Load<IPlugin>(loader);
Today, while working in Visual Studio “Orcas” March CTP I found out about the supports of AddIn. From the .NET Framework Developer’s Guid Add-In Overview the definition is:
The .NET Framework programming model for add-ins involves three areas of development:
The CLR Team has recently posted more about the System.AddIn. Their usage looks like:
AddInStore.Update(addinPath);
IList<AddInToken> tokens = AddInStore.FindAddIns(typeof(AddInType), addinPath);
AddInProcess sharedProcess = new AddInProcess();
foreach (AddInToken token in tokens)
{
token.Activate<AddInType>(sharedProcess , AddInSecurityLevel.FullTrust);
}
As you can see, the usage of the CLR Add-In Team is relatively close to my approach. Although my approach offer better encapsulation of addIn load inside the IExtensibleHost. The System.AddIn ovvering a pipeline which makes this approach more interesting.