Automation/Scripts/ScriptCmdLine.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace ComLib.Automation
{
/// <summary>
/// Executes commands in a script that are in the format of command line arguments. e.g.
/// 1. HelloWorldAutoMap user=kishore isactive=true age=30 birthdate=2/2/1979
/// 2. HelloWorldAutoMap user="kishore1" isactive="true" age="31" birthdate="2/2/1980"
/// </summary>
public class ScriptCmdLine : Script
{
private IDictionary _currentLineArgs;
/// <summary>
/// Initialize with assembly list.
/// </summary>
/// <param name="assemblies">Delimited list of assemblies.</param>
public ScriptCmdLine(string assemblies) : base(assemblies) {}
/// <summary>
/// Registers an external script that may be referenced in the script to run.
/// </summary>
/// <param name="name">The name of the external file to include</param>
/// <param name="content">The content of the external file</param>
public override void Include(string name, string content)
{
throw new NotImplementedException();
}
/// <summary>
/// Returns whether or not the name provided is exists as a variable.
/// </summary>
/// <param name="name">The name of the variable to check if it's an existing variable.</param>
/// <returns></returns>
public override bool IsExistingVariable(string name)
{
if (_currentLineArgs != null && _currentLineArgs.Contains(name))
return true;
return base.IsExistingVariable(name);
}
/// <summary>
/// Sets a variables
/// </summary>
/// <param name="name">Name of the variable</param>
/// <param name="val">Value for the variable</param>
public override void SetVariable(string name, object val)
{
if (IsExistingVariable(val.ToString()))
后面还有 96 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
