Exemple #1
0
 protected virtual void ConfigureInstances()
 {
     Game.SteamHelper   = SteamHelper.Create(); // TODO: Move
     DataCheat.Instance = Container.GetInstance <ICallContextService>();
     CoreCheat.SetServices(Container.GetInstance <ICoreCheatImpl>());
     Tools.RegisterServices(Container.GetInstance <ToolsServices>());
     SyncEvilGlobal.Setup(Container.GetInstance <EvilGlobalServices>(), () => _isPremium() ? 6 : 3);
 }
Exemple #2
0
        private Task ProcessChanges(Dictionary <IAbsoluteDirectoryPath, FileObjectMapping[]> dict,
                                    IAbsoluteDirectoryPath downloadPath, Uri[] hosts, StatusRepo status,
                                    ProgressContainer progress)
        {
            var files = PrepareFiles(dict, downloadPath, hosts, status, progress);

            return(Process(files, downloadPath, hosts, status.CancelToken, SyncEvilGlobal.Limiter()));
        }
Exemple #3
0
        void SetupGlobalServices()
        {
            // TODO: Get rid of this monstrosity.
            // Reason for being here: UserSettings.Current calls into a dialog
            // and global services are just horrible...
            using (MainLog.Bench(null, "SimpleInjector.AfterSetup")) {
                // Tsk
                AfterSetup();
                RegisterToolServices();
                SyncEvilGlobal.Setup(Container.GetInstance <EvilGlobalServices>(), () => 3); // todo
#if DEBUG
                // Creates an instance of every registered type, so better not use unless testing
                //_container.Verify();
#endif
            }
        }