Beispiel #1
0
        /// <summary>
        /// Build a Handler based on the node configuration
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="nodeCtx"></param>
        /// <param name="node"></param>
        /// <returns></returns>
        public T BuildHandler <T>(IActivationContext nodeCtx, HandlerNode node)
        {
            nodeCtx.Register <IEventDataConverter>(node.BuildDataFilter);
            nodeCtx.Register <ConfiguredArguments>(node.BuildArguments);

            var plugin  = _pluginManager.GetPlugin(typeof(T), node);
            var handler = nodeCtx.Resolve <T>(plugin.Type);

            return(handler);
        }