internal void WrapUp(IOutputPortMgr outPortMgr) { if (IsValidContinue && !IsCancelled) { // --- set status's to completed when all is done WorkerStatus = FxWorkerStatus.Completed; Status = FxStatus.Complete; ExecComplete(PercentProgress, false, OutputException, OutputMssg); } else if (IsCancelled) { Status = FxStatus.UnInitialized; ExecComplete(PercentProgress, IsCancelled, OutputException, Properties.Resources.MssgFxExecCancel); } else { // ex cannot be null if an error occured if (OutputException == null) OutputException = new FxExecutionErrorException(Properties.Resources.MssgFxExceptionIsNull); WorkerStatus = FxWorkerStatus.Error; Status = FxStatus.Error; ExecComplete(PercentProgress, IsCancelled, OutputException, string.IsNullOrEmpty(OutputMssg) ? Properties.Resources.MssgFxExecError : OutputMssg); } }
internal void WrapUp(bool isValidContinue, INetwork outputNet0, IOutputPortMgr outPortMgr, Exception ex) { if (isValidContinue && !IsCancelled) { IOutputNetworkPort oPort0 = outPortMgr[0] as IOutputNetworkPort; oPort0.OutputNetwork = outputNet0; // --- set status's to completed when all is done WorkerStatus = FxWorkerStatus.Completed; Status = FxStatus.Complete; ExecComplete(PercentProgress, false, ex, FormatMessage(outputNet0)); } else if (IsCancelled) { Status = FxStatus.UnInitialized; ExecComplete(PercentProgress, IsCancelled, ex, Properties.Resources.MssgFxExecCancel); } else { // ex cannot be null if an error occured if (ex == null) ex = new FxExecutionErrorException(Properties.Resources.MssgFxExceptionIsNull); WorkerStatus = FxWorkerStatus.Error; Status = FxStatus.Error; ExecComplete(PercentProgress, IsCancelled, ex, Properties.Resources.MssgFxExecError); } }
protected internal void ExecError(int progressAtCompletion, bool isCancelled, Exception ex, string mssg) { if (ex == null) ex = new FxExecutionErrorException(Properties.Resources.MssgFxExceptionIsNull); WorkerStatus = FxWorkerStatus.Error; Status = FxStatus.Error; ExecComplete(progressAtCompletion, isCancelled, ex, mssg); }
internal void WrapUp(bool isValidContinue, IPipe pipe, Exception ex) { if (isValidContinue && !IsCancelled) { // --- set status's to completed when all is done WorkerStatus = WorkerStatus.Completed; PersistComplete(PercentProgress, false, ex, null); } else if (IsCancelled) { PersistComplete(PercentProgress, IsCancelled, ex, null); } else { // ex cannot be null if an error occured if (ex == null) ex = new FxExecutionErrorException("An persistance error occured."); WorkerStatus = WorkerStatus.Error; PersistComplete(PercentProgress, IsCancelled, ex, null); } }