本文整理汇总了C#中ICommand.RebuildArgumentsWithSpaceSeparator方法的典型用法代码示例。如果您正苦于以下问题:C# ICommand.RebuildArgumentsWithSpaceSeparator方法的具体用法?C# ICommand.RebuildArgumentsWithSpaceSeparator怎么用?C# ICommand.RebuildArgumentsWithSpaceSeparator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICommand
的用法示例。
在下文中一共展示了ICommand.RebuildArgumentsWithSpaceSeparator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleCommand
internal static void HandleCommand(ICommand command)
{
REPlugin.Instance.Debug.WriteObject(command);
// If a command is for slaves only and the command is from ourself,
// then we must be the Master and therefore we should ignore slave only commands
if (command.IsSlaveOnlyAndFromSelf())
{
return;
}
// make sure someone isn't trying to pull a fast one on my guys
if (!MyUtilities.IsCharacterOnMasterWhiteList(command.SourceCharacter))
{
return;
}
switch (command.Name.ToLower())
{
#region Generic Stuff & Shortcuts to Plugin Commands
case "cmd":
case "c":
ACUtilities.ProcessArbitraryCommand(command.RebuildArgumentsWithSpaceSeparator());
break;
// short cut for running vt commands
case "vt":
ACUtilities.ProcessArbitraryCommand(string.Format("/vt {0}", command.RebuildArgumentsWithSpaceSeparator()));
break;
// Shortcut for running mt commands
case "mt":
ACUtilities.ProcessArbitraryCommand(string.Format("/mt {0}", command.RebuildArgumentsWithSpaceSeparator()));
break;
// Shortcut for local redox extensions commands
case "re":
ACUtilities.ProcessArbitraryCommand(string.Format("/re {0}", command.RebuildArgumentsWithSpaceSeparator()));
break;
case "rew":
ACUtilities.ProcessArbitraryCommand(string.Format("/rew {0}", command.RebuildArgumentsWithSpaceSeparator()));
break;
#endregion
#region Simple Shortcuts to built in commands
// Shortcuts for simple commands.
case "ls":
ACUtilities.ProcessArbitraryCommand("/ls");
break;
case "ah":
ACUtilities.ProcessArbitraryCommand("/ah");
break;
case "hom":
ACUtilities.ProcessArbitraryCommand("/hom");
break;
case "tn":
ACUtilities.ProcessArbitraryCommand("/tn");
break;
#endregion
#region Login & Exit
case "logout":
case "logoff":
SimpleActions.Logout();
break;
case "exit":
SimpleActions.ExitGame();
break;
#endregion
#region Using
case "use":
Actions.Dispatched.UseObject.Create(command).Enqueue();
break;
#endregion
#region Give
case "give":
Actions.Dispatched.GiveItems.Create(command).Enqueue();
break;
#endregion
#region List
case "list":
Actions.Dispatched.ListItems.Create(command).Enqueue();
break;
#endregion
//.........这里部分代码省略.........