Example #1
0
        public void Restart(DateTime restartTime)
        {
            if (!Complete)
            {
                throw new NotSupportedException(String.Format("Cannot restart an activity {0} which is not complete yet.", Name));
            }
            if (currentExecutionMap != null)
            {
                throw new NotSupportedException("Current execution map must be null when restarting an activity.");
            }
            ExecutionMap newCurrent = new ExecutionMap();

            newCurrent.Start(name, String.Empty, restartTime);
            currentExecutionMap = newCurrent;
            complete            = false;
        }
Example #2
0
 public void StartSub(string subActivityName, string parentName, DateTime startTime)
 {
     currentExecutionMap.Start(subActivityName, parentName, startTime);
 }
Example #3
0
 public Activity(string name, DateTime startTime)
 {
     this.name           = name;
     currentExecutionMap = new ExecutionMap();
     currentExecutionMap.Start(name, String.Empty, startTime);
 }