title: Prism ServiceLocator GetInstance and MEF
body: <p>I'm trying to use Microsoft.Practices.ServiceLocation.ServiceLocator and MEF. Interface IServiceLocator defines method GetInstance with two parameters. First parameter is  serviceType and second paremeter is key. </p>
  I have two classes which implement interface IMyInterface and they have Export attribute:</p>
  
  <pre><code>[Export(typeof(IMyInterface)), PartCreationPolicy(CreationPolicy.Shared)]
  public class Class1 : IMyInterface 
  {}
  
  [Export(typeof(IMyInterface)), PartCreationPolicy(CreationPolicy.Shared)]
  public class Class2: IMyInterface 
  {}
  </code></pre>
  
  <p>I want to get instance of Class1 via Prism ServiceLocator GetInstance method:</p>
  
  <pre><code>ServiceLocator.Current.GetInstance(typeof(IMyInterface),"Key");
  </code></pre>
  
  <p>But I have no idea how and where should be "key" defined. I tried to define key in export attribute:</p>
  
  <pre><code>[Export("Key1",typeof(IMyInterface)), PartCreationPolicy(CreationPolicy.Shared)]
  public class Class1 : IMyInterface 
  {}
  
  [Export("Key2",typeof(IMyInterface)), PartCreationPolicy(CreationPolicy.Shared)]
  public class Class2: IMyInterface 
  {}
  </code></pre>
  
  <p>When I call method GetInstance with key parameter</p>
  
  <pre><code>ServiceLocator.Current.GetInstance(typeof(IMyInterface),"Key1");
  </code></pre>
  
  <p>I get Microsoft.Practices.ServiceLocation.ActivationException (Activation error occured while trying to get instance of type IMyInterface, key "Key1"). Does anybody know how can be the export key defined?
  Thanks</p>