protected void RegisterCommand(Type type, bool hidden = true) { CCommand command = ClassUtils.CreateInstance <CCommand>(type); if (command == null) { throw new ArgumentException("Can't create class instance: " + type.FullName); } String commandName = type.Name; if (commandName.StartsWith("Cmd_")) { commandName = commandName.Substring("Cmd_".Length); } command.Name = commandName; command.IsHidden = hidden; RuntimeResolver.ResolveOptions(command); CRegistery.Register(command); }
internal static void ResolveOptions(CCommand command, Type commandType) { RuntimeResolver.ResolveOptions(command, commandType); }
internal static void ResolveOptions(CCommand command) { RuntimeResolver.ResolveOptions(command); }