public PipelineExpression Update(Expression source, SerializationExpression projector, ResultOperator resultOperator)
        {
            if (source != _source ||
                projector != _projector ||
                resultOperator != _resultOperator)
            {
                return(new PipelineExpression(source, projector, resultOperator));
            }

            return(this);
        }
        public PipelineExpression(Expression source, SerializationExpression projector, ResultOperator resultOperator)
        {
            _source         = Ensure.IsNotNull(source, nameof(source));
            _projector      = Ensure.IsNotNull(projector, nameof(projector));
            _resultOperator = resultOperator;

            if (_resultOperator == null)
            {
                _serializer = SerializerHelper.CreateEnumerableSerializer(_projector.Serializer);
                _type       = typeof(IEnumerable <>).MakeGenericType(_projector.Type);
            }
            else
            {
                _serializer = _resultOperator.Serializer;
                _type       = _resultOperator.Type;
            }
        }
 public PipelineExpression(Expression source, SerializationExpression projector)
     : this(source, projector, null)
 {
 }