Пример #1
0
        /// <summary>
        /// Add script result of the operation
        /// </summary>
        /// <param name="script">Script content</param>
        /// <param name="errorMessage">Error occured during script</param>
        /// <param name="status">Status of the script</param>
        /// <returns></returns>
        public TaskScript AddScript(SqlTaskStatus status, string script, string errorMessage = null)
        {
            var newScript = new TaskScript
            {
                Status       = status,
                Script       = script,
                ErrorMessage = errorMessage
            };

            OnScriptAdded(new TaskEventArgs <TaskScript>(newScript, this));
            return(newScript);
        }
 /// <summary>
 /// Updates scripts in sql task given new script
 /// </summary>
 /// <param name="script"></param>
 public void OnScriptAdded(TaskScript script)
 {
     this.SqlTask.AddScript(script.Status, script.Script, script.ErrorMessage);
 }