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


C# CommandStatus类代码示例

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


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


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