public Expression Bind(PipelineExpression pipeline, EmbeddedPipelineBindingContext bindingContext, MethodCallExpression node, IEnumerable <Expression> arguments) { var source = BinderHelper.BindSelect( pipeline, bindingContext, ExpressionHelper.GetLambda(arguments.Single())); var serializer = bindingContext.GetSerializer(source.Selector.Type, source.Selector); return(new PipelineExpression( source, new DocumentExpression(serializer))); }
public Expression Bind(PipelineExpression pipeline, EmbeddedPipelineBindingContext bindingContext, MethodCallExpression node, IEnumerable <Expression> arguments) { var source = pipeline.Source; if (arguments.Any()) { source = BinderHelper.BindSelect( pipeline, bindingContext, ExpressionHelper.GetLambda(arguments.Single())); } return(new PipelineExpression( source, pipeline.Projector, new MinResultOperator(node.Type))); }
public Expression Bind(PipelineExpression pipeline, EmbeddedPipelineBindingContext bindingContext, MethodCallExpression node, IEnumerable <Expression> arguments) { var source = pipeline.Source; if (arguments.Any()) { source = BinderHelper.BindSelect( pipeline, bindingContext, ExpressionHelper.GetLambda(arguments.Single())); } return(new PipelineExpression( source, pipeline.Projector, new StandardDeviationResultOperator( node.Type, bindingContext.GetSerializer(node.Type, node), node.Method.Name == nameof(MongoEnumerable.StandardDeviationSample)))); }