当前位置: 首页>>代码示例>>C#>>正文


C# CommandAction类代码示例

本文整理汇总了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;
 }
开发者ID:vebin,项目名称:LINQBridgeVs,代码行数:8,代码来源:BridgeTrigger.cs

示例2: CommandResponse

 public CommandResponse(CommandAction botAction)
 {
     Action = botAction;
 }
开发者ID:jrmitch120,项目名称:WarlightAiBot,代码行数:4,代码来源:CommandResponse.cs

示例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();
            }
        }
开发者ID:svoruganti,项目名称:bounce,代码行数:9,代码来源:BounceRunner.cs

示例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;
		}
开发者ID:Kjubo,项目名称:xms.core,代码行数:61,代码来源:DataTableAdapter.cs

示例5: RegisterCommand

 public static void RegisterCommand(CommandAction<float, float> action)
 {
     CRegistery.RegisterDelegate(action);
 }
开发者ID:mswf,项目名称:game-a-week,代码行数:4,代码来源:Lunar.cs

示例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();
 }
开发者ID:l1183479157,项目名称:RabbitHub,代码行数:10,代码来源:CommandHelper.cs

示例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");
 }
开发者ID:l1183479157,项目名称:RabbitHub,代码行数:12,代码来源:CommandAttribute.cs

示例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);
 }
开发者ID:gato0429,项目名称:GlobalGame2016,代码行数:4,代码来源:SceneManager.cs

示例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);
 }
开发者ID:gato0429,项目名称:GlobalGame2016,代码行数:8,代码来源:SelectionManager.cs

示例10: GetStatus

 private CommandStates GetStatus(CommandAction action)
 {
     return GetCommandStatus(GetMultiStatus(), action);
 }
开发者ID:EdsonF,项目名称:LINQBridgeVs,代码行数:4,代码来源:LINQBridgeExtension.cs

示例11: CommandLineParseException

 public CommandLineParseException(string parserMessage, CommandAction action)
 {
     _parserMessage = parserMessage;
     _action = action;
 }
开发者ID:surgicalcoder,项目名称:synoptic,代码行数:5,代码来源:CommandLineParseException.cs

示例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));
        }
开发者ID:lancelot2112,项目名称:XerUtilities,代码行数:11,代码来源:Console.cs

示例13: CommandInfo

 public CommandInfo(string commandTag, string description, CommandAction action)
 {
     this.Command = commandTag;
     this.Description = description;
     this.Callback = action;
 }
开发者ID:lancelot2112,项目名称:XerUtilities,代码行数:6,代码来源:Console.cs

示例14: AddOnce

 public void AddOnce(CommandAction action)
 {
     onceMethods.Add(action);
 }
开发者ID:jpennell,项目名称:miranda,代码行数:4,代码来源:Signal.cs

示例15: Execute

        public void Execute(CommandAction action)
        {
            if (SelectedProject == null)
                return;

            BridgeTrigger.Execute(new BridgeTrigger.ExecuteParams(action, SelectedProject.FullName, SolutionName, SelectedAssemblyName, SelectedProjectOutputPath));
        }
开发者ID:vebin,项目名称:LINQBridgeVs,代码行数:7,代码来源:LINQBridgeExtension.cs


注:本文中的CommandAction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。