1 using System.Collections.Generic;
13 protected readonly List<IInitializeSystem> _initializeSystems;
14 protected readonly List<IExecuteSystem> _executeSystems;
15 protected readonly List<ICleanupSystem> _cleanupSystems;
16 protected readonly List<ITearDownSystem> _tearDownSystems;
20 _initializeSystems =
new List<IInitializeSystem>();
21 _executeSystems =
new List<IExecuteSystem>();
22 _cleanupSystems =
new List<ICleanupSystem>();
23 _tearDownSystems =
new List<ITearDownSystem>();
30 var initializeSystem = reactiveSystem != null
34 if(initializeSystem != null) {
35 _initializeSystems.Add(initializeSystem);
39 if(executeSystem != null) {
40 _executeSystems.Add(executeSystem);
43 var cleanupSystem = reactiveSystem != null
47 if(cleanupSystem != null) {
48 _cleanupSystems.Add(cleanupSystem);
51 var tearDownSystem = reactiveSystem != null
55 if(tearDownSystem != null) {
56 _tearDownSystems.Add(tearDownSystem);
65 for (
int i = 0; i < _initializeSystems.Count; i++) {
66 _initializeSystems[i].Initialize();
73 for (
int i = 0; i < _executeSystems.Count; i++) {
74 _executeSystems[i].Execute();
81 for (
int i = 0; i < _cleanupSystems.Count; i++) {
82 _cleanupSystems[i].Cleanup();
89 for (
int i = 0; i < _tearDownSystems.Count; i++) {
90 _tearDownSystems[i].TearDown();
96 for (
int i = 0; i < _executeSystems.Count; i++) {
97 var system = _executeSystems[i];
99 if(reactiveSystem != null) {
103 var nestedSystems = system as
Systems;
104 if(nestedSystems != null) {
105 nestedSystems.ActivateReactiveSystems();
115 for (
int i = 0; i < _executeSystems.Count; i++) {
116 var system = _executeSystems[i];
118 if(reactiveSystem != null) {
122 var nestedSystems = system as
Systems;
123 if(nestedSystems != null) {
124 nestedSystems.DeactivateReactiveSystems();
131 for (
int i = 0; i < _executeSystems.Count; i++) {
132 var system = _executeSystems[i];
134 if(reactiveSystem != null) {
135 reactiveSystem.
Clear();
138 var nestedSystems = system as
Systems;
139 if(nestedSystems != null) {
140 nestedSystems.ClearReactiveSystems();
virtual void DeactivateReactiveSystems()
virtual Systems Add(ISystem system)
Adds the system instance to the systems list.
virtual void ActivateReactiveSystems()
Activates all ReactiveSystems in the systems list.
virtual void Initialize()
IReactiveExecuteSystem subsystem
Systems()
Creates a new Systems instance.
void Clear()
Clears all accumulated changes.
virtual void ClearReactiveSystems()
Clears all ReactiveSystems in the systems list.