public ConstructorInstance ToInstance(IPluginFactory factory, Type pluginType) { var plugin = factory.PluginFor(PluggedType()); var instance = new ConstructorInstance(plugin); if (InstanceKey.IsNotEmpty()) { instance.Name = InstanceKey; } var reader = new InstanceMementoPropertyReader(instance, this, factory); plugin.VisitArguments(reader); return instance; }
private void read(InstanceMemento memento, PluginGraph graph, Type pluginType) { var reader = new InstanceMementoPropertyReader(this, memento, graph, pluginType); plugin.VisitArguments(reader); }