本文整理汇总了C#中CommandAction类的典型用法代码示例。如果您正苦于以下问题:C# CommandAction类的具体用法?C# CommandAction怎么用?C# CommandAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CommandAction类属于命名空间,在下文中一共展示了CommandAction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExecuteParams
public ExecuteParams(CommandAction action, string projectName, string solutionName, string assemblyName, string projectOutput)
{
_action = action;
_projectName = projectName;
_solutionName = solutionName;
_assemblyName = assemblyName;
_projectOutput = projectOutput;
}
示例2: CommandResponse
public CommandResponse(CommandAction botAction)
{
Action = botAction;
}
示例3: BuildTarget
private void BuildTarget(Dictionary<string, ITask> targets, string targetName, CommandAction commandAction)
{
ITask task = FindTarget(targets, targetName);
using (ITaskScope targetScope = _bounce.TaskScope(task, commandAction.Command, targetName)) {
commandAction.Action(task);
targetScope.TaskSucceeded();
}
}
示例4: SetCommandInternal
private DbCommand SetCommandInternal(CommandAction cmdAction, CommandType cmdType, string cmdText, DbParameter[] cmdParameters, bool autoPrepareCommand)
{
DbCommand command = this.GetCommand(cmdAction);
command.Parameters.Clear();
command.CommandType = cmdType;
command.CommandText = this.PretreatmentCommandText(cmdText);
switch (cmdAction)
{
case CommandAction.Select:
_selectCommandParameters = cmdParameters;
if (this._adapter != null)
{
this._adapter.Dispose();
this._adapter = null;
}
if (this._builder != null)
{
this._builder.Dispose();
this._builder = null;
}
break;
case CommandAction.Insert:
_insertCommandParameters = cmdParameters;
if (this._adapter != null)
{
this._adapter.InsertCommand = command;
}
break;
case CommandAction.Update:
_updateCommandParameters = cmdParameters;
if (this._adapter != null)
{
this._adapter.UpdateCommand = command;
}
break;
case CommandAction.Delete:
_deleteCommandParameters = cmdParameters;
if (this._adapter != null)
{
this._adapter.DeleteCommand = command;
}
break;
default:
break;
}
if (cmdParameters != null)
{
for (int i = 0; i < cmdParameters.Length; i++)
{
command.Parameters.Add(cmdParameters[i]);
}
}
if (autoPrepareCommand)
{
command.Prepare();
}
return command;
}
示例5: RegisterCommand
public static void RegisterCommand(CommandAction<float, float> action)
{
CRegistery.RegisterDelegate(action);
}
示例6: GetCommandName
/// <summary>
/// 获取命令名称。
/// </summary>
/// <param name="action">命令动作。</param>
/// <param name="name">命令名称。</param>
/// <returns>命令名称。</returns>
public static string GetCommandName(CommandAction action, string name)
{
return (action == CommandAction.None ? name : string.Format("{0}-{1}", action, name)).Trim();
}
示例7: CommandAttribute
/// <summary>
/// 初始化一个新的命令标记。
/// </summary>
/// <param name="commandAction">命令动作。</param>
/// <param name="commandName">命令名称。</param>
/// <param name="description">命令说明。</param>
public CommandAttribute(CommandAction commandAction, string commandName, string description)
: this(commandName)
{
Action = commandAction;
Description = description.NotEmptyOrWhiteSpace("description");
}
示例8: QueueCommand
// Queue a command to be invoked as soon as possible
public static void QueueCommand(CommandAction command) {
if (Instance != null) Instance.Commands.Add(command);
}
示例9: Target
// Notify of a new action request
private void Target(ActionRequest request) {
var command = new CommandAction() {
Entities = Selected.ToArray(),
Request = request,
};
SceneManager.QueueCommand(command);
}
示例10: GetStatus
private CommandStates GetStatus(CommandAction action)
{
return GetCommandStatus(GetMultiStatus(), action);
}
示例11: CommandLineParseException
public CommandLineParseException(string parserMessage, CommandAction action)
{
_parserMessage = parserMessage;
_action = action;
}
示例12: RegisterCommand
public void RegisterCommand(string commandTag, string description, CommandAction callback)
{
string lowerCommand = commandTag.ToLower();
if (commandTable.ContainsKey(lowerCommand))
{
throw new InvalidOperationException(
String.Format("Command \"{0}\" is already registered.", commandTag));
}
commandTable.Add(lowerCommand, new CommandInfo(commandTag, description, callback));
}
示例13: CommandInfo
public CommandInfo(string commandTag, string description, CommandAction action)
{
this.Command = commandTag;
this.Description = description;
this.Callback = action;
}
示例14: AddOnce
public void AddOnce(CommandAction action)
{
onceMethods.Add(action);
}
示例15: Execute
public void Execute(CommandAction action)
{
if (SelectedProject == null)
return;
BridgeTrigger.Execute(new BridgeTrigger.ExecuteParams(action, SelectedProject.FullName, SolutionName, SelectedAssemblyName, SelectedProjectOutputPath));
}