Two Singleton Instances

Jun 13, 2014 at 3:09 PM
I am wondering if it is possible to have two singleton instances. I have a following scenario described below. I am looking for a way by which firstDeviceDriver and secondDeviceDriver are different instances however in different Algo files they behave as singletons, i.e secondDeviceDriver in both the algo files refer to the same instance.

I am also open on any tricks we can play to make it work ,except creating two devicedriver exports.

--------------------dll one --------------------
[Export]
public class DeviceDriverA
{
}
-------------------- dll two --------------------------
public class AlgoOne
{
  [Import(DeviceDriverA)]   
  public DeviceDriverA firstDeviceDriver {get;set;}

  [Import(DeviceDriverA)]   
  public DeviceDriverA secondDeviceDriver {get;set;}
}

-------------------- dll three --------------------------
public class AlgoTwo
{
  [Import(DeviceDriverA)]   
  public DeviceDriverA secondDeviceDriver {get;set;}
}