示例#1
0
        /// <summary>
        ///     Loads user defined TaskActivity objects in the TaskHubWorker
        /// </summary>
        /// <param name="taskActivityObjects">Objects of with TaskActivity base type</param>
        /// <returns></returns>
        public TaskHubWorker AddTaskActivities(params TaskActivity[] taskActivityObjects)
        {
            foreach (TaskActivity instance in taskActivityObjects)
            {
                ObjectCreator <TaskActivity> creator = new DefaultObjectCreator <TaskActivity>(instance);
                activityManager.Add(creator);
            }

            return(this);
        }
示例#2
0
        /// <summary>
        ///     Loads user defined TaskActivity classes in the TaskHubWorker
        /// </summary>
        /// <param name="taskActivityTypes">Types deriving from TaskOrchestration class</param>
        /// <returns></returns>
        public TaskHubWorker AddTaskActivities(params Type[] taskActivityTypes)
        {
            foreach (Type type in taskActivityTypes)
            {
                ObjectCreator <TaskActivity> creator = new DefaultObjectCreator <TaskActivity>(type);
                activityManager.Add(creator);
            }

            return(this);
        }
示例#3
0
        /// <summary>
        ///     Loads user defined TaskOrchestration classes in the TaskHubWorker
        /// </summary>
        /// <param name="taskOrchestrationTypes">Types deriving from TaskOrchestration class</param>
        /// <returns></returns>
        public TaskHubWorker AddTaskOrchestrations(params Type[] taskOrchestrationTypes)
        {
            foreach (Type type in taskOrchestrationTypes)
            {
                ObjectCreator <TaskOrchestration> creator = new DefaultObjectCreator <TaskOrchestration>(type);
                orchestrationManager.Add(creator);
            }

            return(this);
        }