Method Eval
Eval(EvalFlags, BsonJavaScript, params object[])
Evaluates JavaScript code at the server.
[Obsolete("Use the overload of Eval that has an EvalArgs parameter instead.")]
public virtual BsonValue Eval(EvalFlags flags, BsonJavaScript code, params object[] args)
Parameters
flags
EvalFlagsFlags that control Eval options.
code
BsonJavaScriptThe code to evaluate.
args
object[]Optional arguments (only used when the code is a function with parameters).
Returns
- BsonValue
The result of evaluating the code.
Eval(BsonJavaScript, params object[])
Evaluates JavaScript code at the server.
[Obsolete("Use the overload of Eval that has an EvalArgs parameter instead.")]
public virtual BsonValue Eval(BsonJavaScript code, params object[] args)
Parameters
code
BsonJavaScriptThe code to evaluate.
args
object[]Optional arguments (only used when the code is a function with parameters).
Returns
- BsonValue
The result of evaluating the code.
Eval(EvalArgs)
Evaluates JavaScript code at the server.
public virtual BsonValue Eval(EvalArgs args)
Parameters
args
EvalArgsThe args.
Returns
- BsonValue
The result of evaluating the code.