BIG EDIT: This problem is probably being caused by MEF!
I'm using a service oriented architecture and have all my MVC controllers perform actions through the services.
I have a base service that looks like this:
public abstract class BaseService
{
protected MyObjectModel context;
public BaseService()
{
co...
helos,
my application allows users to write plugins (implementing IPlugin) that they can instantiate at runtime. on startup a directory of plugin .dlls is parsed, registering all the available plugins infos. at runtime a GUI is provided that lets users create instances of any of the plugins. this works.
but now i see MEF and hope i ca...
Hi all,
After reading some stuff such as this: http://mikehadlow.blogspot.com/2008/09/managed-extensibility-framework-why.html
I understand that MEF has some featcures that I will not find in an IoC, and that MEF has some IoC stuff that is probaboly not as advanced as some other IoC systems can offer.
I need the MEF stuff. Do I also n...
I have coded a service like that :
public interface IMyInterface
{
...
}
[Export(typeof(IMyInterface))]
internal class MyService : IMyInterface
{
...
}
Now, I'd like to import several instances of MyService with MEF in my main program.
How can I do that ?
With [Import] private IMyInterface MyService { get; set; } I only get 1 i...
Hi,
I'm trying to write a simple MEF demo to learn about it. I'm following this tutorial, but it seems to be outdated. The downloadable example works, but it uses an included assembly that is 2 versions older (2008.9.4.0) than the current one (4.0) that ships with Framwework 4.
In particular, it uses DirectoryPartCatalog that I cannot ...
Hi
Does anyone have any examples of using MEF in an XBAP application? Is it even possible?
UPDATE *
It looks like it is possible, but the location of the component parts is probably different than a 'normal' MEF application. So it looks like the following code isn't quite right - can anyone suggest a change to make it load properly ...
Hello,
In the past I had problems with the browser cache serving older versions of the xap file.
In order to overcome this I dynamically add a query string parameter containg the last modified date of the xap file to the silverlight source parameter in aspx page. This guarentees that clients will receive the latest xap file and not a ca...
MEF is a great framework. I can just put a dll into given directory and when host composition goes the DLL code will run.
The question is if it is possible to create objects and use interfaces from XAML description, not from DLLs, in the case?
...
So I've been tinkering in the last few days with nServiceBus.
Here a few things that I want to know.
How do I get a version that will play nice with .net 4.0? I'm using NServiceBus.2.0.0.1145 which I believe is the lastest but I needed to convert the sample solutions to VS2010 (which works fine) but their target framework is 3.5. Also...
I have an application (just a test) which uses MEF and PRISM.
It's quite easy to load some exports that conform to specific interfaces
and pass them to the constructor of the modules that are being loaded, but I'm trying to do something different.
When the application starts, it imports an implementation of IControllerClient.
The creat...
I have an application in .NET 4 that uses MEF for extensibility. My main application has three assemblies: Host, Application and Contracts.
Host is the "boot-strapping" executable that creates the container and does the composition.
Application contains the logic of my application, and more extension points for 3rd parties.
Contracts...
I am developing a host application using Managed Extensibility Framework and it's built against .NET 4 and the System.ComponentModel.Composition assembly that is built into the framework. I would like to support the ability to develop parts using .NET 3.5 and export them declaratively.
Since the export attributes are new in .NET 4 and t...
For those that work with application extensibility in .NET, what do you prefer doing - creating your own extensibility layer or using MEF (Managed Extensibility Framework) or MAF (Managed Add-in Framework)?
So far, I've used both ways of implementing application extensibility and I like MEF for the fact that it makes it easier to load e...
I'm trying to figure out why one of my objects does not seem to be satisfying its Import. I think it may be the way I am using the container.ComposeParts() function but I have not been able to find much documentation with regards to it.
I have four projects
MEF.Service.Contracts
MEF.Service.Messaging (implements contracts)
MEF.Service.C...
Hi,
I am writing a small plugin architecture and I have decided to use MEF
I have been told that we must use a config file.
Is there any example out there that that uses Mef and a config file?
All I need is how to set up mef in a config file is this possible? This is a small noddy example I have built to test it I am missing the load...
Hi all
I need to implement a very small plugin architecture.I am new to MEF so even simple things become complex.
Lets assume I have 2 dlls Client(Executing Assembly) and Server
Within Server I have a folder called "Plugins"
Usually I create a "Plugins" folder in the bin directory of the executingAssembly and all works with this piece o...
I have created a MEF plugin control that I import into my app. Now, I want the plugin to be able to import parts from the app. I can't figure how setup the catalog in the plugin, so that it can find the exports from the app. Can somebody tell me how this is done? Below is my code which doesn't work when I try to create an AssemblyCat...
easy task, but couldn't find any direction.
i want to intercept object creation of MEF and return proxy (using castle dynamic proxy) of my object either then the object itself.
is it possible to do that?
...
I need to be able to, at runtime, load two classes that share an unknown type, like this:
interface IProducer<out A>
{
public A CookOne();
}
interface IConsumer<in A>
{
public void EatOne(A food);
}
The entire list of possible involved types can't be known at compile time because they don't exist yet. The software that uses t...
I want to refactor a DLL to make it MEFable too. Should I unit test whether a class is decorated with [Export] or [Import] and other MEF attributes?
...