Exemple #1
0
 public override void BuildParameters(DataRow row, DataObjectStore store, IList <ParameterProfile> paramInfos)
 {
     this.dataHandler.Parameters.Clear();
     this.dataHandler.ClearParameterNames();
     this.modifiedParametersDescription = MonadSaveTask.BuildParametersDescription(row, paramInfos);
     this.dataHandler.CommandText       = MonadPipelineSaveTask.BuildCommandScript(this.originalCommandText, row, paramInfos);
 }
Exemple #2
0
        private void BuildCommandScript(DataRow row, IList <ParameterProfile> paramInfos)
        {
            DataRow dataRow = this.PrepareCombineRow(row);

            foreach (KeyValuePair <DataRow, SingleTaskDataHandler> keyValuePair in this.permissionItems)
            {
                this.CopyPermission(dataRow, keyValuePair.Key);
                keyValuePair.Value.CommandText = MonadPipelineSaveTask.BuildCommandScript(this.CommandText, dataRow, paramInfos);
            }
        }
Exemple #3
0
 private static string ReplaceParameterPlaceholder(string rawScript, IList <string> paramStrings, IList <ParameterProfile> paramInfos)
 {
     return(MonadPipelineSaveTask.placeholderRegex.Replace(rawScript, delegate(Match match)
     {
         string text = match.Value.Substring(1, match.Value.Length - 2);
         int parameterIndex;
         if (!int.TryParse(text, out parameterIndex))
         {
             string paramName = text;
             parameterIndex = MonadPipelineSaveTask.GetParameterIndex(paramName, paramInfos);
         }
         return paramStrings[parameterIndex];
     }));
 }
Exemple #4
0
        public static string BuildCommandScript(string rawScript, DataRow row, IList <ParameterProfile> paramInfos)
        {
            IList <string> paramStrings = MonadPipelineSaveTask.BuildParameterStrings(row, paramInfos);

            return(MonadPipelineSaveTask.ReplaceParameterPlaceholder(rawScript, paramStrings, paramInfos));
        }