示例#1
0
 private static void CreateRoutine(IRoutine routine)
 {
     try
     {
         PushRoutineToHeap(routine);
         routine.Start().Wait();
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 public static void Start(IRoutine routine)
 {
     smethod_0(routine, routineEvent_0);
     try
     {
         routine.Start();
     }
     catch (Exception exception)
     {
         ilog_0.Error("Exception during routine Start.", exception);
     }
     smethod_0(routine, routineEvent_1);
 }
示例#3
0
文件: Program.cs 项目: fishykins/CAM
        /// <summary>
        /// Initialize script here. This is essentially "free" computing, and wont affect the program average runtime...
        /// </summary>
        public Program()
        {
            //Compile core variables
            manualProgram = new ManualProgram(this);
            gridAnalyser  = new GridAnalyser(this);
            output        = new Output(this, programTag);
            timer         = gridAnalyser.GetTimer(programTag);
            diagnostics   = new Diagnostics(this, diagnosticTag);
            diagnostics.Start();

            //Add routines here
            routines.Add(new Logistics(this, logisticsTag));
            routines.Add(new Hangar(this, hangarTag));
            routines.Add(new Factory(this, factoryTag));
            //routines.Add(new AirlockManager(this, airlockTag));

            InitRoutines();

            //Set how often this runs
            Runtime.UpdateFrequency = UpdateFrequency.Update1;
        }