コード例 #1
0
        public IEnumerable <string> GetDoc()
        {
            int cmdCount  = cmdAttrs.Length;
            int hostCount = commandHostAttrs.Length;

            yield return(commandObject.IntanceType.Name);

            for (int i = 0; i < hostCount; i++)
            {
                if (commandHosts[i].GetValue(commandObject.TargetInstance) is CommandObject cmdobj)
                {
                    foreach (string j in new DocGen(cmdobj).GetDoc())
                    {
                        yield return($"  {j}");
                    }
                }
            }

            for (int i = 0; i < cmdCount; i++)
            {
                CommandAttribute       _cmdAttr    = cmdAttrs[i];
                CommandArguAttribute[] _paramInfos = paramAttrs[i];
            }
        }
コード例 #2
0
        }                                   // not root

        public static bool CanInvoke(CommandAttribute attribute, CommandArguAttribute[] paramInfos, string methodName, IArgument[] args)
        {
            return(CanInvoke(attribute, paramInfos, methodName, args, StringComparison.Ordinal));
        }
コード例 #3
0
        }                  // not root

        public static object Invoke(MethodInfo method, CommandAttribute attribute, CommandArguAttribute[] paramInfos, object instance, IArgument[] args)
        {
            return(Invoke(method, attribute, paramInfos, instance, args, StringComparison.Ordinal));
        }    // not root
コード例 #4
0
 public static bool TryInvoke(MethodInfo method, CommandAttribute attribute, CommandArguAttribute[] paramInfos, object instance, IArgument[] args, out object result)
 {
     return(TryInvoke(method, attribute, paramInfos, instance, args, StringComparison.Ordinal, out result));
 }                  // not root