Beispiel #1
0
        public void Start()
        {
            if (this.DatabaseModel == null)
            {
                this.BuildModel();
            }

            RuleController ruleController = new RuleController();

            //Filter out rules which should not run
            var filteredExes = this.Executables.GetExecutables().ToList();

            filteredExes.RemoveAll(e => e.IsRule() && !this.RulesToRun.Contains(e));
            //Create a new Rule Collection containing only the executables in filteredExes
            ExecutableCollection executables = new ExecutableCollection(filteredExes);

            ruleController.ExecutionFinished += new ExecutionFinishedHandler(RuleController_ExecutionFinished);
            ruleController.Execute(executables, this.DatabaseModel, this.TablesToCheck, new IssueCollector());
        }
Beispiel #2
0
    private void Awake()
    {
        var resourceManager = new ResourcesManager();

        _player = resourceManager.Player;
        _player.transform.position = _playerStarPoint.position;

        _interactables = new InteractableObjectCollection(_bonusData);
        _executable    = new ExecutableCollection(
            new List <IExecutable>
        {
            new MoveController(_player),
            new CameraMoveController(_player, resourceManager.MainCamera)
        },
            _interactables.GetExecutableCollection()
            );

        _scoreController = new ScoreController(new UiTextScoreViewer());

        FindObjectsOfType <BaseGameObject>().ToList().ForEach(o => o.Initialize());

        //_executable.AddOnDestroySubscribers(new Action<InteractableObject> [] {_scoreController.UpdateScore});
    }
Beispiel #3
0
        public void Run(Configuration config)
        {
            this.IssueCollector.Reset();
            this.Config = config;
            //If no tables, assumme all tables
            if (config.TablesToCheck == null || config.TablesToCheck.Count() == 0)
            {
                config.TablesToCheck = this.DatabaseModel.Tables;
            }
            //If no rules are specified, assume all schema rules (primarily for command line)
            if (config.RulesToRun == null || config.RulesToRun.Count() == 0)
            {
                config.RulesToRun = this.AllExecutables.GetSchemaRules();
            }
            //Filter out rules which should not run
            var filteredExes = this.AllExecutables.GetExecutables().ToList();

            filteredExes.RemoveAll(e => e.IsRule() && !config.RulesToRun.Contains(e));
            //Create a new Rule Collection containing only the executables in filteredExes
            ExecutableCollection executables = new ExecutableCollection(filteredExes);

            this.RuleController.ExecutionFinished += new ExecutionFinishedHandler(RuleController_ExecutionFinished);
            this.RuleController.Execute(executables, this.DatabaseModel, config.TablesToCheck, this.IssueCollector);
        }