public OverviewerRenderer(IConfigService config, IHostEnv hostEnv)
 {
     _pythonExecutable = config.PythonLocation.FullName;
     _overviewerFile   = config.OverviewerLocation.FullName;
     _tempPath         = Path.Combine(config.TempLocation.FullName, OverviewerFolder);
     _hostEnv          = hostEnv;
 }
Beispiel #2
0
        public NodeService(ILogger <NodeService> logger, IHostEnv hostEnv, IAccountCollectionAsync store,
                           IHubContext <LyraEventHub, ILyraEvent> lyraEventContext)
        {
            //if (Instance == null)
            //    Instance = this;
            //else
            //    throw new InvalidOperationException("Should not do this");

            _log              = logger;
            _hostEnv          = hostEnv;
            _store            = store;
            _lyraEventContext = lyraEventContext;
        }
        public WorldArchivist(IConfigService config, IWorldDeleter deleter, IHostEnv hostEnv)
        {
            _deleter      = deleter;
            _serverFolder = config.ServerLocation;
            _tempFolder   = config.TempLocation;

            var archivePath = Path.Combine(config.DataLocation.FullName, ArchiveFoldername);

            _archiveFolder = new DirectoryInfo(archivePath);
            if (!_archiveFolder.Exists)
            {
                _archiveFolder.Create();
            }
        }
        public DagSystem(IHostEnv hostEnv, IAccountCollectionAsync store, IHubContext <LyraEventHub, ILyraEvent> hub, Wallet posWallet, IActorRef localNode)
        {
            _hostEnv    = hostEnv;
            _log        = new SimpleLogger("DagSystem").Logger;
            FullStarted = false;
            _hub        = hub;

            Storage   = new TracedStorage(store);
            PosWallet = posWallet;

            LocalNode = localNode;
            this.LocalNode.Tell(this);

            if (hostEnv != null)     // for unit test
            {
                TheBlockchain = ActorSystem.ActorOf(BlockChain.Props(this, Storage));
                TaskManager   = ActorSystem.ActorOf(Neo.Network.P2P.TaskManager.Props(this));

                //TradeEngine = new TradeMatchEngine(Storage);
            }

            Singleton = this;
        }