public IPipeline <T> AddBehavior(PipelineBehaviorPosition position, IBehavior <T> behavior)
        {
            Ensure.NotNull(behavior, "behavior");
            switch (position)
            {
            case PipelineBehaviorPosition.Before:
                PreBehaviors.Add(behavior);
                break;

            case PipelineBehaviorPosition.After:
                PostBehaviors.Add(behavior);
                break;

            default:
                throw Ensure.Exception.NotSupported("Position '{0}' is not supported by ReflectionPipeline.", position);
            }

            return(this);
        }
 public IPipeline <T> AddBehavior(PipelineBehaviorPosition position, IBehavior <T> behavior)
 {
     EnsureGeneratedPipeline();
     generatedPipeline.AddBehavior(position, behavior);
     return(this);
 }