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


C# CommandSet.ToString方法代码示例

本文整理汇总了C#中CommandSet.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# CommandSet.ToString方法的具体用法?C# CommandSet.ToString怎么用?C# CommandSet.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CommandSet的用法示例。


在下文中一共展示了CommandSet.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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

示例2: transmitSync

 public DCPRetCodes transmitSync(CommandSet a_cmd, MessageTypes a_msgType, byte[] a_msg)
 {
     try
     {
         string str = Encoding.ASCII.GetString(a_msg, 0, a_msg.GetLength(0));
         string str2 = a_cmd.ToString() + " " + a_msgType.ToString() + " msg: " + str;
         DCP_DLL.Utils.log(this, "transmitSync ", str2);
         this.checkPortAvailability();
         this._transmitFinished = false;
         DCPTelegram telegram = new DCPTelegram {
             CmdSet = a_cmd,
             MsgType = a_msgType
         };
         telegram.Data.copy(a_msg);
         this.pushTelegram(telegram, this._txFifo, this._txFifoMutex);
         while (!this._transmitFinished)
         {
             Thread.Sleep(this._ThreadSleepTime);
         }
         return this._transmitResult;
     }
     catch (Exception exception)
     {
         DCP_DLL.Utils.log(this, "transmitSync ", exception.Message);
         return DCPRetCodes.DCP_FATAL;
     }
 }
开发者ID:x893,项目名称:WDS,代码行数:27,代码来源:DCP.cs


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