public NewSceneProcessor(ComponentWrapperListBuilder componentWrapperListBuilder, TaskManager taskManager, 
 ComponentWrapperList wrappedComponents)
   {
       this.componentWrapperListBuilder = componentWrapperListBuilder;
         this.taskManager = taskManager;
         this.wrappedComponents = wrappedComponents;
         currentScene = new amBXScene { SceneType = eSceneType.Composite };
   }
        public void RefreshTasks(ComponentWrapperList preRunComponentList)
        {
            var componentGroupings = preRunComponentList.Get()
            .GroupBy(cmp => cmp.ComponentType).ToList();

              if (componentGroupings.Count() != 1)
              {
            throw new InvalidOperationException("Composite and Singular in same time qqUMI");
              }

              foreach (var componentGrouping in componentGroupings)
            foreach (var component in componentGrouping)
            {
              ScheduleTask(component, 0);
            }
        }
        private void PushChanges()
        {
            if (!previousScene.HasRepeatableFrames && !currentScene.HasRepeatableFrames)
              {
            // TODO: Log error
            return;
              }

              wrappedComponents = componentWrapperListBuilder.Build(currentScene);
              taskManager.RefreshTasks(wrappedComponents);
        }
 public ComponentWrapperListBuilder()
 {
     componentsList = new ComponentWrapperList();
 }