Automation/Commands/CommandResult.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ComLib.Automation
{
/// <summary>
/// Result of a script action.
/// </summary>
[Serializable]
public class CommandResult : RunResult
{
/// <summary>
/// Null object
/// </summary>
public static readonly CommandResult Empty = new CommandResult(DateTime.MinValue, DateTime.MaxValue, false, string.Empty);
/// <summary>
/// Initialize
/// </summary>
/// <param name="started">Start time of script</param>
/// <param name="ended">End time of script.</param>
/// <param name="success">Whether or not the script execution was successful</param>
/// <param name="message">A combined message of all the errors.</param>
public CommandResult(DateTime started, DateTime ended, bool success, string message)
: base(started, ended, success, message)
{
}
/// <summary>
/// Name of the command.
/// </summary>
public string Name { get; set; }
/// <summary>
/// Index of the command.
/// </summary>
public int Index { get; set; }
/// <summary>
/// Key that can be used to uniquely identify a command result.
/// </summary>
public string RefKey { get; set; }
/// <summary>
/// Xml representation of result
/// </summary>
/// <returns></returns>
public string ToXml()
{
return @"<commandresult"
+ " name=\"" + Name + "\""
+ " index=\"" + Index + "\""
+ " success=\"" + (Success ? "true" : "false") + "\""
后面还有 5 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
