コード例 #1
0
ファイル: SimpleFxBase.cs プロジェクト: BgRva/Blob1
 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);
     }
 }
コード例 #2
0
ファイル: ExtractKthCoreFx.cs プロジェクト: BgRva/Blob1
        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);
            }
        }
コード例 #3
0
ファイル: SimpleFxBase.cs プロジェクト: BgRva/Blob1
        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);
        }
コード例 #4
0
ファイル: PipePersister.cs プロジェクト: BgRva/Blob1
 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);
     }
 }