示例#1
0
        public void Init()
        {
            _blockChainService   = Services.GetService <IBlockChainService>();
            _difficultyService   = Services.GetService <IDifficultyService>();
            _transactionVerifier = Services.GetService <ITransactionVerifier>();
            _walletService       = Services.GetService <IWalletService>();
            _logger = Services.GetService <ILogger>();

            _eventManager = Services.GetService <IEventManager>();

            _memPoolFullPath = $"{Configurations.CurrentPath}\\BlockChain\\Data\\MemPool.json";
            TryLoadMemPool();
            MemPool.CollectionChanged += MemPool_CollectionChanged;

            CurrentWorkers = new List <Thread>();
            Terminators    = new Dictionary <int, bool>();

            return;

            Task.Run(delegate
            {
                _logger.Log("Starting first miner in 6..");
                Thread.Sleep(3000);
                _logger.Log("Starting first miner in 3..");
                Thread.Sleep(3000);
                TryRestartingWorkers();
            });
        }
示例#2
0
 public void Init()
 {
     _transactionVerifier = Services.GetService <ITransactionVerifier>();
     _difficultyService   = Services.GetService <IDifficultyService>();
     _blockChainService   = Services.GetService <IBlockChainService>();
     _minerService        = Services.GetService <IMinerService>();
 }
 public EditDifficultyView(Pool pool, IViewService viewService, IDifficultyService difficultyService)
     : base("EditorView/Difficulty/DifficultyView")
 {
     this.pool = pool;
     this.viewService = viewService;
     this.difficultyService = difficultyService;
 }
        public void Setup()
        {
            IKernel kernel = new StandardKernel();

            kernel.Load(Assembly.GetExecutingAssembly());
            DifficultyService = kernel.Get <IDifficultyService>();
        }
示例#5
0
 public QuestionService(IQuestionRepository questionRepository,
                        ISubjectService subjectService,
                        IGradeService gradeService,
                        IComplexityService complexityService,
                        IDifficultyService diffficultyService,
                        IPassageService passageService)
 {
     QuestionRepository = questionRepository;
     SubjectService     = subjectService;
     GradeService       = gradeService;
     ComplexityService  = complexityService;
     DifficultyService  = diffficultyService;
     PassageService     = passageService;
 }
 public DifficultyController(IDifficultyService difficultyService)
 {
     _difficultyService = difficultyService;
 }
 public DifficultyModelService(IDifficultyService difficultyService)
 {
     _difficultyService = difficultyService;
 }
 public DifficultyController(IDifficultyService service)
 {
     this.service = service;
 }
示例#9
0
 private void createServices()
 {
     timeService = new TimeService();
     eventService = new EventService();
     uiFactoryService = new UIFactoryService();
     wwwService = new FakeWwwService();//controller.GameObject.AddComponent<WwwService>();
     viewService = new ViewService(eventService, uiFactoryService);
     loadService = new LoadService(eventService);
     gameService = new GameService(pool, viewService);
     pathService = new PathService(pool, wwwService, eventService);
     levelService = new LevelService(wwwService, eventService);
     enemyService = new EnemyService(pool, wwwService, eventService);
     bonusService = new BonusService(pool, wwwService, eventService);
     difficultyService = new DifficultyService(pool, wwwService, eventService);
     infoService = new InfoService(viewService, uiFactoryService, eventService);
     settingsService = new SettingsService(pool);
     translationService = new TranslationService(settingsService);
     languageService = new LanguageService(wwwService, eventService);
     analyticsService = new AnalyticsService(settingsService);
     shipService = new ShipService(timeService, eventService);
     gamerService = new GamerService(eventService);
     currencyService = new CurrencyService(eventService, gamerService);
     iapService = new IAPService(eventService);
     adService = new AdService(currencyService);
     shopService = new ShopService(currencyService, eventService, iapService);
     updateables.Add(infoService);
 }