I have two different Silverlight UserControls imported with MEF from two different xaps. The UserControls are simply an Image on a Canvas. Both UserControls have the image marked as 'Resource'. The images are different but their names are the same (key point). I'm not quite sure what's going on behind the scenes of the MEF import but bot...
I am relatively new to MEF so I don't fully understand the capabilities. I'm trying to achieve something similar to Unity's InjectionMember.
Let's say I have a class that imports MEF parts. For the sake of simplicity, let's take the following class as an example of the exported part.
[Export]
[PartCreationPolicy(CreationPolicy.NonShare...
Using the new Visual Studio 2010 SDK developing against the MEF based editor structure there's a question:
How can I use the MEF editor interfaces to handle snippet behavior in IntelliSense? The ICompletionSession itself is not a problem (e.g. get the available snippets) rather filling the snippet, handling the subsequently expected act...
UPDATE
As I've tried to get MEF working throughout my application, I'm coming across more an more places where I just don't get why it's not automatically creating my library when I expect it to. I think it all comes back to what Reed was saying about needing MEF to create everything. So right now, I have an XML reader class that need...
When I try to do this:
[Export(typeof(IMyService))]
[PartCreationPolicy(CreationPolicy.Shared)]
private MyService Service
{
get
{
var service = new MyService();
service.Configure();
return service;
}
}
I get a compile error: Attribute 'PartCreationPolicy' is not valid on this declaration type. It is...
This is sort of a continuation of one of my earlier posts, which involves the resolving of modules in my WPF application. This question is specifically related to the effect of interdependencies of modules and the method of constructing those modules (i.e. via MEF or through new) on MEF's ability to resolve relationships.
First of all,...
I've had a few questions about MEF recently, but here's the big one -- is it really all-or-nothing, as it appears to be?
My basic application structure is simply an app, several shared libraries that are intended to be singletons, and several different plugins (which may implement different interfaces). The app loads the plugins, and b...
I have an interesting situation where I need to do something like this:
[Export[typeof(ICandy1)]
[Export[typeof(ICandy2)]
public class Candy : ICandy2 { ... }
where
public interface ICandy1 { ... }
public interface ICandy2 : ICandy1 { ... }
I couldn't find any posts anywhere regarding using multiple [Export] attributes, so I figur...
I'm trying to do a proof of concept app for my work using ASP.NET WebForms and the Managed Extensibility Framework. I've got things up and running(ish), but I can't seem to figure out how to attach the instance of Visual Studio that has the MEF code in it to the instance of Visual Studio that is running the Web App.
How can I attach my...
Hi all ,
I need your advice deciding on a new project architecture I'm going to implement.
Can I use MEF and Prism side by side?
Is it too complex to accomplish this?
Can make the same stuff Prism does with MEF?
Right now, two features Prism gives, but are not in MEF are Regions and the Event Aggregator. Can I do everything else wi...
I have been developing a managed extensibility framework application for the last several months using the community preview. I have been using the GetExportedValues() method and the PartCreationPolicy(CreationPolicy.NonShared) to fake a class factory (since only the silverlight version supports a factory). This was working great until...
I've seen lots of MEF code for plugging into custom apps, but I am yet to find out how to write a plugin for VS2010 using MEF. I was under the impression that the new IDE supported this.
Does anyone know if this is supported 'out of the box', or does it require an install. Does anyone have any links, tips, etc to get me started.
...
I primarily use NInject as my IoC container, and is very happy with it - don't want to change that. But some things I want to import using MEF. The thing is, I want the imports to created by the IoC container as the imports can have dependencies to things that I've registered in the NInject IoC.
So, my question is: can I import the type...
The latest push on Codplex (http://mef.codeplex.com/) is from Tue Feb 16 2010 at 9:00 (Preview 9 - Beta). Any idea where to get the latest final source which has been released in in .NET 4.0 recently?
...
What are some best practices for using MEF in your code? Are there any pitfalls to take into account when starting your extensible application? Did you run into anything you should have known earlier?
...
What is the best approach for navigating between UserControls/Pages(out of browser experience)? I'm fairly new to Silverlight and even newer to the mvvm pattern.
How well does the Navigation Framework Integrate with the MVVM Light Toolkit? A snippet for general application flow control with the two would be great.
The plan was to use...
Right now, I'm trying to separate out a set of constantly changing classes into their own dll and dynamically load them using MEF. My problem is that whenever I try and overwrite the dll while the app is running, it says it's in use.
Is there anyway to configure MEF to let me overwrite the dll and pick up the changes while the app is ...
Hello!
I am just trying to wrap my head around MEF.
And as I am really going to love it ( I guess ) I started my first sample project and immediatly stumbled into a big problem and now I am asking myself if I can use MEF for my scenario at all and that is the following:
Imagine that one got some kind of dashboard with, let's say, five ...
Hi there.
I have a program that is extendable by plugins using the Microsoft Extensibility Framework.
But i dont want untrusted sources to give out plugins that may be insecure.
So i want to sign the plugins (maybe with Visual Studio's built in signing) and check if the plugins are trustworthy at program start.
I didn't find a way to ch...
I'm using constructor dependency injection in my WPF application and I keep running into the following pattern, so would like to get other people's opinion on it and hear about alternative solutions.
The goal is to wire up a hierarchy of ViewModels to a similar hierarchy of Models, so that the responsibility for presenting the informati...