• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# CommandStatus类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中CommandStatus的典型用法代码示例。如果您正苦于以下问题:C# CommandStatus类的具体用法?C# CommandStatus怎么用?C# CommandStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CommandStatus类属于命名空间,在下文中一共展示了CommandStatus类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Dispose

 public void Dispose()
 {
     if (dest == null) return;
     if (attacking == true && attacktask != null) attacktask.Deactivate();
     attacktask = null;
     this.status = CommandStatus.FINISHED;
 }
开发者ID:Willyham,项目名称:SagaRO2,代码行数:7,代码来源:Attack.cs


示例2: Insert

        /// <summary> Called to save a pdu into the database </summary>
        /// <param name="dataTransaction"></param>
        /// <param name="logKey"></param>
        /// <param name="smscServiceId"></param>
        /// <param name="pduDirectionType"></param>
        /// <param name="commandLength"></param>
        /// <param name="commandSet"></param>
        /// <param name="commandStatus"></param>
        /// <param name="sequenceNumber"></param>
        /// <param name="details"></param>
        /// <param name="pduDataBlocks"></param>
        /// <returns> long </returns>
        public static Guid? Insert(DataTransaction dataTransaction, string logKey, int smscServiceId, PduDirectionTypes pduDirectionType, long commandLength,
                                   CommandSet commandSet, CommandStatus commandStatus, long sequenceNumber, List<PduPropertyDetail> details, List<byte[]> pduDataBlocks)
        {
            Guid? pduHeaderId = null;

            // Prepare the database call
            using (DbCommand dbCommand = dataTransaction.GetStoredProcCommand("spSMPP_Pdu_Insert"))
            {
                // Prepare the call
                dataTransaction.AddInParameterString(dbCommand, "LogKey", logKey);
                dataTransaction.AddInParameterInteger(dbCommand, "SMSCServiceID", smscServiceId);
                dataTransaction.AddInParameterShort(dbCommand, "Direction", (short) pduDirectionType);
                dataTransaction.AddInParameterLong(dbCommand, "CommandLength", commandLength);
                dataTransaction.AddInParameterString(dbCommand, "CommandId", commandSet.ToString());
                dataTransaction.AddInParameterString(dbCommand, "CommandStatusId", commandStatus.ToString());
                dataTransaction.AddInParameterLong(dbCommand, "SequenceNumber", sequenceNumber);
                dataTransaction.AddInParameterTable(dbCommand, "PduPropertyDetails", new PduPropertyDetails(details));
                dataTransaction.AddInParameterTable(dbCommand, "PduDataBlocks", new SMSCPduDataBlocks(pduDataBlocks));

                dataTransaction.AddOutParameterGuid(dbCommand, "PduHeaderId");

                dataTransaction.ExecuteNonQuery(dbCommand);

                pduHeaderId = dataTransaction.GetParameterValueGuid(dbCommand, "PduHeaderId");
            }

            return pduHeaderId;
        }
开发者ID:kamaroly,项目名称:SMPPClient,代码行数:40,代码来源:PduData.cs


示例3: GetCommandStatus

        public CommandStatusResult GetCommandStatus(IImmutableSet<IProjectTree> nodes, long commandId, bool focused, string commandText, CommandStatus progressiveStatus) {
            if ((VSConstants.VSStd2KCmdID)commandId == VSConstants.VSStd2KCmdID.EXCLUDEFROMPROJECT && nodes != null && nodes.Count > 0) {
                return new CommandStatusResult(true, commandText, CommandStatus.NotSupported | CommandStatus.Invisible);
            }

            return CommandStatusResult.Unhandled;
        }
开发者ID:AlexanderSher,项目名称:RTVS-Old,代码行数:7,代码来源:ExcludeFromProjectCommand.cs


示例4: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if(!Page.IsPostBack)
        {
            if(!String.IsNullOrEmpty(Request["userName"])
               && !String.IsNullOrEmpty(Request["Id"]))
            {
                string userName = Request["userName"];
                string authorizationKey = Request["Id"];

                CommandStatus status = new CommandStatus();
                new UserService().AuthorizeUser(userName, authorizationKey, status);
                if (status.IsError == false)
                {
                    //User u = new UserService().GetByLogin(userName);
                    //Seppuku.Domain.Kingdom k = new KingdomService().GetByUserId(u.UserId);
                    //new MapService().InitializeKingdom(k.MapId, k.KingdomId);
                    LblResult.Text = "Twoje konto zostało aktywowane. Możesz zalogować się na stronę.";
                }
                else switch (status.Message)
                    {
                        case "Invalid UserName":
                            LblResult.Text = "Link aktywacyjny niepoprawny. Błędna nazwa użytkownika";
                            break;
                        case "Invalid Authentication Key":
                            LblResult.Text = "Link aktywacyjny niepoprawny. Błędny klucz aktywacyjny";
                            break;
                        case "Already Approved":
                            LblResult.Text = "Użytkownik został już wcześniej aktywowany. Możesz zalogować się na swoje konto";
                            break;
                    }

            }
        }
    }
开发者ID:Lucasus,项目名称:sepuku,代码行数:35,代码来源:ActivateUser.aspx.cs


示例5: GetCommandStatusAsync

 public Task<CommandStatusResult> GetCommandStatusAsync(IImmutableSet<IProjectTree> nodes, long commandId, bool focused, string commandText, CommandStatus progressiveStatus) {
     var workflow = _interactiveWorkflowProvider.GetOrCreate();
     if (commandId == RPackageCommandId.icmdCopyRemoteItemPath && nodes.IsSingleNodePath() && workflow.RSession.IsHostRunning && workflow.RSession.IsRemote) {
         return Task.FromResult(new CommandStatusResult(true, commandText, CommandStatus.Enabled | CommandStatus.Supported));
     }
     return Task.FromResult(CommandStatusResult.Unhandled);
 }
开发者ID:Microsoft,项目名称:RTVS,代码行数:7,代码来源:CopyRemoteItemPathCommand.cs


示例6: CommandResult

 /// <summary>Parameterized constructor.
 /// </summary>
 public CommandResult(CommandStatus status, string commandId, string exceptionTypeName, string errorMessage, IDictionary errorData)
 {
     this.Status = status;
     this.CommandId = commandId;
     this.ExceptionTypeName = exceptionTypeName;
     this.ErrorMessage = errorMessage;
     this.ErrorData = errorData;
 }
开发者ID:y2ket,项目名称:thinknet,代码行数:10,代码来源:CommandResult.cs


示例7: GetCommandStatus

 public CommandStatusResult GetCommandStatus(IImmutableSet<IProjectTree> nodes, long commandId, bool focused, string commandText, CommandStatus progressiveStatus) {
     if (commandId == RPackageCommandId.icmdSetDirectoryHere && nodes.Count == 1) {
         var session = _interactiveWorkflowProvider.Active?.RSession;
         bool enabled = session != null && session.IsHostRunning && !session.IsRemote;
         return new CommandStatusResult(true, commandText, enabled ? CommandStatus.Enabled | CommandStatus.Supported : CommandStatus.Supported);
     }
     return CommandStatusResult.Unhandled;
 }
开发者ID:Microsoft,项目名称:RTVS,代码行数:8,代码来源:SetDirectoryHereCommand.cs


示例8: CommandResult

 /// <summary>Parameterized constructor.
 /// </summary>
 public CommandResult(CommandStatus commandStatus, string commandId, string aggregateRootId, int exceptionCode, string errorMessage)
 {
     Status = commandStatus;
     CommandId = commandId;
     AggregateRootId = aggregateRootId;
     ExceptionCode = exceptionCode;
     ErrorMessage = errorMessage;
 }
开发者ID:key-value,项目名称:enode,代码行数:10,代码来源:CommandResult.cs


示例9: CommandResult

 /// <summary>Parameterized constructor.
 /// </summary>
 public CommandResult(CommandStatus status, string commandId, string aggregateRootId, string result = null, string resultType = null)
 {
     Status = status;
     CommandId = commandId;
     AggregateRootId = aggregateRootId;
     Result = result;
     ResultType = resultType;
 }
开发者ID:linkai0924,项目名称:enode,代码行数:10,代码来源:CommandResult.cs


示例10: CommandResult

 /// <summary>Parameterized constructor.
 /// </summary>
 public CommandResult(CommandStatus status, string commandId, string aggregateRootId, string exceptionTypeName, string errorMessage)
 {
     Status = status;
     CommandId = commandId;
     AggregateRootId = aggregateRootId;
     ExceptionTypeName = exceptionTypeName;
     ErrorMessage = errorMessage;
 }
开发者ID:andyshao,项目名称:enode,代码行数:10,代码来源:CommandResult.cs


示例11: GenericNackSm

 /// <summary> Constructor </summary>
 /// <param name="defaultEncoding"></param>
 /// <param name="status"></param>
 /// <param name="sequence"></param>
 private GenericNackSm(DataCodings defaultEncoding, CommandStatus status, uint sequence)
     : base(defaultEncoding)
 {
     Length = (uint) Header.HEADER_LENGTH;
     Command = CommandSet.GenericNack;
     Status = status;
     Sequence = sequence;
 }
开发者ID:kamaroly,项目名称:SMPPClient,代码行数:12,代码来源:GenericNackSm.cs


示例12: SubmitMultiSmResp

        /// <summary> Constructor </summary>
        /// <param name="defaultEncoding"></param>
        /// <param name="commandStatus"></param>
        /// <param name="sequence"></param>
        /// <param name="messageId"></param>
        private SubmitMultiSmResp(DataCodings defaultEncoding, CommandStatus commandStatus, uint sequence, string messageId)
            : base(defaultEncoding, CommandSet.SubmitMultiSmResp, commandStatus, sequence)
        {
            MessageId = messageId;

            UnsuccessDestinationAddresses = new List<UnsuccessDestinationAddress>();
            Optional = new TLVCollection();
        }
开发者ID:kamaroly,项目名称:SMPPClient,代码行数:13,代码来源:SubmitMultiSmResp.cs


示例13: Or

		public static CommandStatus Or(this CommandStatus status1, CommandStatus status2)
		{
			if (status1 == CommandStatus.Normal || status2 == CommandStatus.Normal)
				return CommandStatus.Normal;
			if (status1 == CommandStatus.Disabled || status2 == CommandStatus.Disabled)
				return CommandStatus.Disabled;
			return CommandStatus.Unavailable;	
		}
开发者ID:rsdn,项目名称:janus,代码行数:8,代码来源:CommandStatusHelper.cs


示例14: Create

        /// <summary> Called to create a DataSmResp object </summary>
        /// <param name="defaultEncoding"></param>
        /// <param name="dataSm"></param>
        /// <param name="commandStatus"></param>
        /// <param name="messageId"></param>
        /// <returns> DataSmResp </returns>
        public static DataSmResp Create(DataCodings defaultEncoding, DataSm dataSm, CommandStatus commandStatus, string messageId)
        {
            if (dataSm.SourceAddr == string.Empty || dataSm.SourceAddr == null)
            {
                commandStatus = CommandStatus.ESME_RINVSRCADR;
            }

            return new DataSmResp(defaultEncoding, commandStatus, dataSm.Sequence, messageId);
        }
开发者ID:kamaroly,项目名称:SMPPClient,代码行数:15,代码来源:DataSmResp.cs


示例15: Create

        /// <summary> Called to create a DataSmResp object </summary>
        /// <param name="defaultEncoding"></param>
        /// <param name="submitSm"></param>
        /// <param name="commandStatus"></param>
        /// <param name="messageId"></param>
        /// <returns> DataSmResp </returns>
        public static SubmitSmResp Create(DataCodings defaultEncoding, SubmitSm submitSm, CommandStatus commandStatus, string messageId)
        {
            if (submitSm.DestAddr == string.Empty || submitSm.DestAddr == null)
            {
                commandStatus = CommandStatus.ESME_RINVDSTADR;
            }

            return new SubmitSmResp(defaultEncoding, commandStatus, submitSm.Sequence, messageId);
        }
开发者ID:kamaroly,项目名称:SMPPClient,代码行数:15,代码来源:SubmitSmResp.cs


示例16: Do

        public void Do()
        {
            if (Status == CommandStatus.Done || Status == CommandStatus.Redone)
                throw new InvalidOperationException("The action has been done already.");

            _Do();

            _commandStatus = (_commandStatus == CommandStatus.Ready) ? CommandStatus.Done : CommandStatus.Redone;
        }
开发者ID:shmeleva,项目名称:University-Projects,代码行数:9,代码来源:Command.cs


示例17: Undo

        public void Undo()
        {
            if (Status == CommandStatus.Ready || Status == CommandStatus.Undone)
                throw new InvalidOperationException("The action needs to be done first.");

            _Undo();

            _commandStatus = CommandStatus.Undone;
        }
开发者ID:shmeleva,项目名称:University-Projects,代码行数:9,代码来源:Command.cs


示例18: Create

        /// <summary> Called to create a DeliverSmResp object </summary>
        /// <param name="defaultEncoding"></param>
        /// <param name="deliverSm"></param>
        /// <param name="commandStatus"></param>
        /// <returns> DeliverSmResp </returns>
        public static DeliverSmResp Create(DataCodings defaultEncoding, DeliverSm deliverSm, CommandStatus commandStatus)
        {
            if (deliverSm.SourceAddr == string.Empty || deliverSm.SourceAddr == null)
            {
                commandStatus = CommandStatus.ESME_RINVSRCADR;
            }

            return new DeliverSmResp(defaultEncoding, commandStatus, deliverSm.Sequence);
        }
开发者ID:kamaroly,项目名称:SMPPClient,代码行数:14,代码来源:DeliverSmResp.cs


示例19: QueryStatus

 public bool QueryStatus(CommandID cmdId, CommandStatus status, CommandText text)
 {
     var frame = ActiveFrame;
     if (frame == null)
         return false;
     var ct = frame.Pane as ICommandTarget;
     if (ct == null)
         return false;
     return ct.QueryStatus(cmdId, status, text);
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:10,代码来源:TabControlHost.cs


示例20: GetCommandStatusAsync

        public Task<CommandStatusResult> GetCommandStatusAsync(IImmutableSet<IProjectTree> nodes, long commandId, bool focused, string commandText, CommandStatus status) {
            if (_session.IsHostRunning && _commandIds.Contains(commandId)) {
                if (nodes.Any(IsRData)) {
                    status |= CommandStatus.Supported | CommandStatus.Enabled;
                    return Task.FromResult(new CommandStatusResult(true, commandText, status));
                }
            }

            return Task.FromResult(CommandStatusResult.Unhandled);
        }
开发者ID:AlexanderSher,项目名称:RTVS-Old,代码行数:10,代码来源:OpenRDataCommandGroupHandler.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CommandTarget类代码示例发布时间:2022-05-24
下一篇:
C# CommandSource类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap