private static FixtureModel[] buildFixturesWithOverrides(RunInput input, SystemRecycled systemRecycled)
        {
            var overrides = FixtureLoader.LoadFromPath(input.FixturePath);
            var system    = new FixtureLibrary();

            foreach (var fixture in systemRecycled.fixtures)
            {
                system.Models[fixture.key] = fixture;
            }

            return(system.ApplyOverrides(overrides).Models.ToArray());
        }
예제 #2
0
        internal FixtureModel[] BuildFixturesWithOverrides(SystemRecycled systemRecycled)
        {
            var overrides = FixtureLoader.LoadFromPath(FixturePath);
            var system    = new FixtureLibrary();

            foreach (var fixture in systemRecycled.fixtures)
            {
                system.Models[fixture.key] = fixture;
            }

            return(system.ApplyOverrides(overrides).Models.ToArray());
        }
예제 #3
0
        public virtual void ReloadFixtures()
        {
            try
            {
                _lock.Write(() => { _overrides = FixtureLoader.LoadFromPath(_fixturePath); });

                sendUpdatesToClient();
            }
            catch (Exception e)
            {
                Logger.Error("Failed to reload the fixtures", e);
            }
        }
        public static FixtureLibrary BuildCombinedFixtureLibrary(ProjectInput input, EngineController controller)
        {
            var loading = controller.Start();

            var reading = Task.Factory.StartNew(() => FixtureLoader.LoadFromPath(input.FixturePath));

            Task.WaitAll(loading, reading);

            var combined = FixtureLibrary.From(loading.Result.fixtures)
                           .ApplyOverrides(reading.Result);

            return(combined);
        }
예제 #5
0
        public void StartWatching(string path)
        {
            try
            {
                _fixturePath = path.ToFullPath();

                _lock.Write(() => { _overrides = FixtureLoader.LoadFromPath(_fixturePath); });

                _watcher.StartWatching(path, this);
            }
            catch (Exception e)
            {
                Logger.Error("Failed to start watching fixture files", e);
            }
        }