Пример #1
0
        /// <summary>
        /// Constructs a branch path in this pipeline.
        /// </summary>
        /// <param name="pipe">The IBranchPipe that branchs at this point</param>
        /// <returns>This builder instance, so you can use it in a fluent fashion</returns>
        public BranchBuilder BranchPipe(IBranchPipe pipe)
        {
            var specializer = new BranchPipeInstanceSpecifier(pipe);

            _pipeline.AddPipe(specializer);
            return(new BranchBuilder(_pipeline));
        }
Пример #2
0
 // Ctor accepting the IBranchPipe been wrapped and the list of pipeline IDs that are restricts its
 // branching.
 // If an empty restriction is passed it means that it can branch to any pipeline.
 internal BranchPipeWrapper(IBranchPipe pipe, IEnumerable <string> restrictions)
 {
     _pipe         = pipe;
     _restrictions = restrictions?.ToArray() ?? new string[0];
 }
 // Ctor accepting the instance to be encapsulated.
 public BranchPipeInstanceSpecifier(IBranchPipe instance)
 {
     _instance     = instance;
     _restrictions = new List <string>();
 }