/// <summary> /// Add an Erlang reduce phase to the list of phases. /// </summary> /// <param name="setup"> /// An <see cref="Action{T}"/> that accepts a <see cref="RiakFluentActionPhaseErlang"/>, /// and configures the reduce phase with it. /// </param> /// <returns>A reference to this updated instance, for fluent chaining.</returns> /// <remarks> /// Configure the phase with a lambda similar to: /// <code>.ReduceErlang(r => r.ModFun("riak_kv_mapreduce", "reduce_set_union")</code> /// The code above will run the "riak_kv_mapreduce:reduce_set_union" Erlang function on the phase inputs. /// </remarks> public RiakMapReduceQuery ReduceErlang(Action <RiakFluentActionPhaseErlang> setup) { var phase = new RiakReducePhase <RiakPhaseLanguageErlang>(); var fluent = new RiakFluentActionPhaseErlang(phase); setup(fluent); phases.Add(phase); return(this); }
public RiakMapReduceQuery ReduceErlang(Action<RiakFluentActionPhaseErlang> setup) { var phase = new RiakReducePhase<RiakPhaseLanguageErlang>(); var fluent = new RiakFluentActionPhaseErlang(phase); setup(fluent); _phases.Add(phase); return this; }