Example #1
0
        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;
        }
Example #2
0
        private void read(InstanceMemento memento, PluginGraph graph, Type pluginType)
        {
            var reader = new InstanceMementoPropertyReader(this, memento, graph, pluginType);

            plugin.VisitArguments(reader);
        }
 private void read(InstanceMemento memento, PluginGraph graph, Type pluginType)
 {
     var reader = new InstanceMementoPropertyReader(this, memento, graph, pluginType);
     plugin.VisitArguments(reader);
 }