internal FunctionResult ExecuteCompiled(params object[] parameters) { FunctionTester <MongoDBMapReduce> functionTester = new FunctionTester <MongoDBMapReduce>(); functionTester.CustomTypes.Add(OutputType); return(functionTester.Compile( new PropertyValue(MongoDBMapReduceShared.Names.ConnectionString, ConnectionString), new PropertyValue(MongoDBMapReduceShared.Names.Collection, Collection), new PropertyValue(MongoDBMapReduceShared.Names.Query, Query), new PropertyValue(MongoDBMapReduceShared.Names.OutputType, OutputType), new PropertyValue(MongoDBMapReduceShared.Names.Sort, Sort), new PropertyValue(MongoDBMapReduceShared.Names.Limit, Limit), new PropertyValue(MongoDBMapReduceShared.Names.Map, Map), new PropertyValue(MongoDBMapReduceShared.Names.Reduce, Reduce), new PropertyValue(MongoDBMapReduceShared.Names.Finalize, Finalize), new PropertyValue(MongoDBMapReduceShared.Names.ReturnOptionsPropertyName, ReturnModeType) ).Execute( new ParameterValue[] { new ParameterValue(MongoDBMapReduceShared.Names.ConnectionString, ConnectionString), new ParameterValue(MongoDBMapReduceShared.Names.Collection, Collection), new ParameterValue(MongoDBMapReduceShared.Names.Query, Query), new ParameterValue(MongoDBMapReduceShared.Names.Sort, Sort), new ParameterValue(MongoDBMapReduceShared.Names.Limit, Limit), new ParameterValue(MongoDBMapReduceShared.Names.Map, Map), new ParameterValue(MongoDBMapReduceShared.Names.Reduce, Reduce), new ParameterValue(MongoDBMapReduceShared.Names.Finalize, Finalize) }.Concat(parameters.Where(v => v is ParameterValue).Select(v => v as ParameterValue)).ToArray() )); }
internal FunctionResult ExecuteCompiled(params object[] parameters) { FunctionTester <MongoDBRead> functionTester = new FunctionTester <MongoDBRead>(); functionTester.CustomTypes.Add(OutputType); return(functionTester.Compile( new PropertyValue(MongoDBReadShared.Names.ConnectionString, ConnectionString), new PropertyValue(MongoDBReadShared.Names.Collection, Collection), new PropertyValue(MongoDBReadShared.Names.Query, Query), new PropertyValue(MongoDBReadShared.Names.OutputType, OutputType), new PropertyValue(MongoDBReadShared.Names.AggregationPipeline, AggregationPipeline), new PropertyValue(MongoDBReadShared.Names.Fields, Fields), new PropertyValue(MongoDBReadShared.Names.Sort, Sort), new PropertyValue(MongoDBReadShared.Names.Skip, Skip), new PropertyValue(MongoDBReadShared.Names.Limit, Limit), new PropertyValue(MongoDBReadShared.Names.Operation, Operation), new PropertyValue(MongoDBReadShared.Names.ReturnOptionsPropertyName, ReturnModeType) ).Execute( new ParameterValue[] { new ParameterValue(MongoDBReadShared.Names.ConnectionString, ConnectionString), new ParameterValue(MongoDBReadShared.Names.Collection, Collection), new ParameterValue(MongoDBReadShared.Names.Query, Query), new ParameterValue(MongoDBReadShared.Names.AggregationPipeline, AggregationPipeline), new ParameterValue(MongoDBReadShared.Names.Fields, Fields), new ParameterValue(MongoDBReadShared.Names.Sort, Sort), new ParameterValue(MongoDBReadShared.Names.Skip, Skip), new ParameterValue(MongoDBReadShared.Names.Limit, Limit) }.Concat(parameters.Where(v => v is ParameterValue).Select(v => v as ParameterValue)).ToArray() )); }