예제 #1
0
        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();
        }
예제 #2
0
        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();
        }