예제 #1
0
            async Task <PreprocessingStepParams> ProcessLoadedStep(PreprocessingHistoryItem loadedStep, PreprocessingStepParams currentParams)
            {
                var step = owner.CreateStepByName(loadedStep.StepName, SetArgument(currentParams, loadedStep.Argument));

                if (step != null)
                {
                    return(await step.ExecuteLoadedStep(this));
                }
                return(null);
            }
예제 #2
0
 static IEnumerable <PreprocessingHistoryItem> LoadStepsFromConnectionParams(IConnectionParams connectParams)
 {
     for (int stepIdx = 0; ; ++stepIdx)
     {
         string stepStr = connectParams[string.Format("{0}{1}", ConnectionParamsKeys.PreprocessingStepParamPrefix, stepIdx)];
         if (stepStr == null)
         {
             break;
         }
         if (PreprocessingHistoryItem.TryParse(stepStr, out var step))
         {
             yield return(step);
         }
     }
 }
예제 #3
0
 public static bool TryParse(string str, out PreprocessingHistoryItem ret)
 {
     str = str.Trim();
     if (str.Length != 0)
     {
         int idx = str.IndexOf(' ');
         if (idx == -1)
         {
             ret = new PreprocessingHistoryItem(str);
         }
         else
         {
             ret = new PreprocessingHistoryItem(str.Substring(0, idx), str.Substring(idx + 1));
         }
         return(true);
     }
     ret = null;
     return(false);
 }