예제 #1
0
 public void Start(dynamic startingParameters = null)
 {
     if (SyncContext == null)
     {
         ZonePrograms.ForEach(zp => zp.Start(startingParameters: startingParameters ?? StartingParameters));
     }
     else
     {
         SyncContext.Sync(ZonePrograms, startingParameters: startingParameters);
     }
 }
예제 #2
0
 public void Dispose(bool force)
 {
     Name = null;
     if (Zones != null)
     {
         ZonePrograms.Parallelize(zp => zp?.Stop(force));
     }
     ZonePrograms?.ForEach(zoneProgram => zoneProgram?.Dispose());
     Zones?.ForEach(zone => zone?.UnsetProgram());
     Zones       = null;
     ProgramName = null;
     SyncContext?.Dispose();
     SyncContext = null;
 }