Exemplo n.º 1
0
        public PluginContainer(
            IInternalPluginHost pluginHost,
            IIORegistry ioRegistry,
            CompositionContainer parentContainer,
            INodeInfoFactory nodeInfoFactory,
            DotNetPluginFactory pluginFactory,
            Type pluginType,
            INodeInfo nodeInfo
            )
        {
            FIOFactory = new IOFactory(pluginHost, ioRegistry, parentContainer, nodeInfoFactory, pluginFactory);

            var catalog            = new TypeCatalog(pluginType);
            var ioExportProvider   = new IOExportProvider(FIOFactory);
            var hostExportProvider = new HostExportProvider()
            {
                PluginHost = pluginHost
            };
            var exportProviders = new ExportProvider[] { hostExportProvider, ioExportProvider, parentContainer };

            FContainer = new CompositionContainer(catalog, exportProviders);
            FContainer.ComposeParts(this);
            FPlugin = PluginBase as IPluginEvaluate;

            FAutoEvaluate = nodeInfo.AutoEvaluate;
            FIOFactory.OnCreated(EventArgs.Empty);
        }
Exemplo n.º 2
0
 public IOExportProvider(IOFactory ioFactory)
 {
     FIOFactory = ioFactory;
 }