Automation/Commands/CommandAttribute.cs

(完整代码) 1KB

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



namespace ComLib.Automation
{  
    /// <summary>
    /// Attribute used to define a command class used in automation.
    /// </summary>
    public class CommandAttribute : ExtensionAttribute
    {
        /// <summary>
        /// Initialize defaults
        /// </summary>
        public CommandAttribute()
        {
            AutoHandleMethodCalls = true;
        }


        /// <summary>
        /// Whether or not this command can handle multiple methods calls.
        /// e.g. Command named "Blog" can handle method calls such as Blog.Delete(1); Blog.Create("test"); etc.
        /// </summary>
        public bool IsMultiMethodEnabled { get; set; }


        /// <summary>
        /// Handle method calls automatically
        /// </summary>
        public bool AutoHandleMethodCalls { get; set; }


        /// <summary>
        /// Whether or not to automap arguments from input to public instance settable properties on the command class.
        /// </summary>
        public bool AutoMap { get; set; }
    }
}

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

AI 解读

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

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