private Reducer ReducerFactory( IQueueClient queueClient = null, IConfig config = null, IWorkerRecordStoreService workerRecordStoreService = null, ICommandDispatcher commandDispatcher = null) { queueClient = CheckParam(queueClient); config = CheckParam(config); workerRecordStoreService = CheckParam(workerRecordStoreService); commandDispatcher = CheckParam(commandDispatcher); commandDispatcher.RegisterReducerFunc(new MostAccidentProneReducer()); var redcuer = new Reducer(queueClient, config, workerRecordStoreService, commandDispatcher); return(redcuer); }