public MatingEventsController(ICache cache, IAuthTokenReader tokenReader, ITraceExporter traceExporter)
        {
            if (tokenReader == null)
            {
                throw new ArgumentNullException(nameof(tokenReader));
            }

            var userToken   = tokenReader.GetToken();
            var frogMine    = new FrogMine(userToken, cache, DbUtils.ConnectionString, traceExporter);
            var tadpoleMine = new TadpoleMine(userToken, cache, DbUtils.ConnectionString, traceExporter);

            _mine = new MatingEventMine(userToken, frogMine, tadpoleMine, traceExporter);
        }
Beispiel #2
0
        public Genesis(string user, string connectionString, ITraceExporter traceExporter)
        {
            _day = DateTime.MinValue;
            var cache = new InProcessCache();

            var tadpoleMine = new TadpoleMine(user, cache, connectionString, traceExporter);

            _pondMine            = new PondMine(user, cache, connectionString, traceExporter);
            _frogMine            = new FrogMine(user, cache, connectionString, traceExporter);
            _pairSelectionMine   = new PairSelectionMine(user, _frogMine, traceExporter);
            _maturationEventMine = new MaturationEventMine(user, _frogMine, tadpoleMine, traceExporter);
            _matingEventMine     = new MatingEventMine(user, _frogMine, tadpoleMine, traceExporter);
            _frogCountMine       = new FrogCountMine(user, connectionString, traceExporter);
            _tadpoleCountMine    = new TadpoleCountMine(user, connectionString, traceExporter);
        }
 public MatingEventTerminalLayer(FrogMine frogMine, TadpoleMine tadpoleMine)
 {
     _frogMine    = frogMine ?? throw new ArgumentNullException(nameof(frogMine));
     _tadpoleMine = tadpoleMine ?? throw new ArgumentNullException(nameof(tadpoleMine));
 }
Beispiel #4
0
 public MaturationEventMine(string user, FrogMine frogMine, TadpoleMine tadpoleMine, ITraceExporter traceExporter) :
     base(user, new MaturationEventTerminalLayer(frogMine, tadpoleMine), traceExporter)
 {
 }