private void StartProcess() { Process.Start(); // Initialize the process' xml state and collect the info to be serialized XProcessState = new XElement(XSessionNames.ProcessState , new XAttribute(XSessionNames.AProcessID, Process.Id) , new XAttribute(XSessionNames.AStartTime, Process.StartTime) ); XTaskState.Add(XProcessState); OnProcessStarted(); }
private void CompleteWithError(Exception ex) { Debug.Assert(ex != null); ErrorEx = ex; // Create the node and add it to our state xml var xerror = XNames.CreateXError(ex); XTaskState.Add(xerror); IsComplete = true; Status = AppTaskStatus.Error; OnCompletedWithError(); }