public static InstanceFactory CreateFactoryForFamily(PluginFamily family, ProfileManager profileManager) { family.Seal(); var factory = new InstanceFactory(family); Instance instance = family.GetDefaultInstance(); if(instance != null) { profileManager.SetDefault(family.PluginType, instance); } return factory; }
public IInstanceFactory Clone() { var factory = new InstanceFactory(_pluginType); factory.MissingInstance = MissingInstance; factory._lifecycle = _lifecycle; factory._instances = _instances.Clone(); return factory; }
protected void registerFactory(Type pluginType, InstanceFactory factory) { _factories.Add(pluginType, factory); }