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); }
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); } } }
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); }