Automation/Scripts/ScriptXml.cs

(开头部分) 9KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Text.RegularExpressions;


namespace ComLib.Automation
{
    /// <summary>
    /// Executes command in a script that are in the format of xml. similar to NAnt.
    /// Features Include:
    /// 
    /// # GENERAL
    /// Scenario: Can use variables in script
    /// Scenario: Can map commands to c# classes
    /// Scenario: Can automap command parameters to c# class properties 
    /// Scenario: C# Command classes have access to use inner xml element for data
    /// Scenario: Command can be configured to fail but allow script to continue running
    /// Scenario: Script result has access to each command result ( command Index, return value, success / fail, message )
    /// Scenario: Script result can build up text combining all command result messages
    /// Scenario: Can specify a "RefKey" on a command to uniquey identify and retrieve that command result value
    /// Scenario: Can include file into the script
    /// Scenario: Can add script variables programmatically
    /// 
    /// # FAILURE
    /// Scenario: Script can gracefully handle invalid xml 
    /// Scenario: Script can gracefully handle invalid command
    /// Scenario: Script can gracefully handle command exception
    /// 
    /// # SUBSTITUTIONS
    /// Scenario: Variables can reference other variables using format ${variable_name}
    /// Scenario: Command parameters can reference variables using format ${variable_name}
    /// Scenario: Command can assign it's return value to a variable via "assignto" parameter assignto="${hello_world_result}
    /// Scenario: Registered default variables
    /// Scenario: Register functions ${date.hour} using name/lamda pairs
    /// </summary>
    public class ScriptXml : Script
    {
        private Dictionary<string, XmlDocument> _includedDocs = new Dictionary<string, XmlDocument>();
        private XmlNode _xmlCommandCurrent;


        /// <summary>
        /// Default constructor.
        /// </summary>
        public ScriptXml()
        {
        }


        /// <summary>
        /// Initialize with assembly list.
        /// </summary>
        /// <param name="assemblies">Delimited list of assemblies.</param>
        public ScriptXml(string assemblies) : base(assemblies) {}


        /// <summary>
后面还有 205 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。