Exemplo n.º 1
0
        /// <summary>
        /// Instructs the pipeline to register this step before the <paramref name="step"/> one.
        /// </summary>
        public void InsertBefore(WellKnownStep step)
        {
            if (step == null)
            {
                throw new ArgumentNullException("step");
            }

            InsertBefore((string)step);
        }
Exemplo n.º 2
0
        /// <summary>
        /// <see cref="Replace(string,System.Type,string)"/>
        /// </summary>
        /// <param name="wellKnownStep">The identifier of the well known step to replace.</param>
        /// <param name="newBehavior">The new <see cref="IBehavior{TContext}"/> to use.</param>
        /// <param name="description">The description of the new behavior.</param>
        public void Replace(WellKnownStep wellKnownStep, Type newBehavior, string description = null)
        {
            if (wellKnownStep == null)
            {
                throw new ArgumentNullException("wellKnownStep");
            }

            Replace((string)wellKnownStep, newBehavior, description);
        }
Exemplo n.º 3
0
        /// <summary>
        /// <see cref="Register(string,System.Type,string)"/>
        /// </summary>
        /// <param name="wellKnownStep">The identifier of the step to add.</param>
        /// <param name="behavior">The <see cref="IBehavior{TContext}"/> to execute.</param>
        /// <param name="description">The description of the behavior.</param>
        public void Register(WellKnownStep wellKnownStep, Type behavior, string description)
        {
            if (wellKnownStep == null)
            {
                throw new ArgumentNullException("wellKnownStep");
            }

            Register((string)wellKnownStep, behavior, description);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Instructs the pipeline to register this step after the <paramref name="step"/> one. If the <paramref name="step"/> does not exist, this condition is ignored.
        /// </summary>
        /// <param name="step">The unique identifier of the step that we want to insert after.</param>
        public void InsertAfterIfExists(WellKnownStep step)
        {
            if (step == null)
            {
                throw new ArgumentNullException("step");
            }

            InsertAfterIfExists((string)step);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Instructs the pipeline to register this step before the <paramref name="step"/> one. If the <paramref name="step"/> does not exist, this condition is ignored. 
        /// </summary>
        /// <param name="step">The <see cref="WellKnownStep"/> that we want to insert before.</param>
        public void InsertBeforeIfExists(WellKnownStep step)
        {
            if (step == null)
            {
                throw new ArgumentNullException("step");
            }

            InsertBeforeIfExists((string) step);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Removes the specified step from the pipeline.
        /// </summary>
        /// <param name="wellKnownStep">The identifier of the well known step to remove.</param>
        public void Remove(WellKnownStep wellKnownStep)
        {
            // I can only remove a behavior that is registered and other behaviors do not depend on, eg InsertBefore/After
            if (wellKnownStep == null)
            {
                throw new ArgumentNullException("wellKnownStep");
            }

            Remove((string)wellKnownStep);
        }
 public void Register(string pipelineStep, Type behavior, string description)
 {
     Register(WellKnownStep.Create(pipelineStep), behavior, description);
 }
 public void Register(WellKnownStep wellKnownStep, Type behavior, string description)
 {
     additions.Add(RegisterStep.Create(wellKnownStep, behavior, description));
 }
Exemplo n.º 9
0
 internal static RegisterStep Create(WellKnownStep wellKnownStep, Type behavior, string description)
 {
     return(new DefaultRegisterStep(behavior, wellKnownStep, description));
 }
Exemplo n.º 10
0
 internal static RegisterStep Create(WellKnownStep wellKnownStep, Type behavior, string description)
 {
     return new DefaultRegisterStep(behavior, wellKnownStep, description);
 }
Exemplo n.º 11
0
        /// <summary>
        /// Instructs the pipeline to register this step after the <paramref name="step"/> one.
        /// </summary>
        public void InsertAfter(WellKnownStep step)
        {
            if (step == null)
            {
                throw new ArgumentNullException("step");
            }

            InsertAfter((string)step);
        }