예제 #1
0
        /// <summary>
        /// Creates a new factory which can translate <see cref="IPipeline"/> blueprints into runnable <see cref="IDataFlowPipelineEngine"/> instances.
        /// </summary>
        /// <param name="useCase">The use case which describes which <see cref="IPipeline"/> are compatible, which objects are available for hydration/preinitialization etc</param>
        /// <param name="mefPlugins">Class for generating Types by name, use <see cref="ICatalogueRepository.MEF"/> to get this </param>
        public DataFlowPipelineEngineFactory(IPipelineUseCase useCase, MEF mefPlugins)
        {
            _mefPlugins = mefPlugins;
            _context    = useCase.GetContext();
            _useCase    = useCase;
            _flowType   = _context.GetFlowType();

            _constructor = new ObjectConstructor();

            _engineType = typeof(DataFlowPipelineEngine <>).MakeGenericType(_flowType);
        }