當前位置: 首頁>>代碼示例>>C#>>正文


C# Impl.Command類代碼示例

本文整理匯總了C#中RabbitMQ.Client.Impl.Command的典型用法代碼示例。如果您正苦於以下問題:C# Command類的具體用法?C# Command怎麽用?C# Command使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Command類屬於RabbitMQ.Client.Impl命名空間,在下文中一共展示了Command類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: OnCommandReceived

 public virtual void OnCommandReceived(Command cmd)
 {
     CommandHandler handler = CommandReceived;
     if (handler != null)
     {
         handler(this, cmd);
     }
 }
開發者ID:REALTOBIZ,項目名稱:mono,代碼行數:8,代碼來源:SessionBase.cs

示例2: CreateConnectionClose

 public override void CreateConnectionClose(ushort reasonCode,
                                            string reasonText,
                                            out Command request,
                                            out int replyClassId,
                                            out int replyMethodId)
 {
     request = new Command(new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionClose(reasonCode,
                                                                                 reasonText,
                                                                                 0, 0));
     replyClassId = RabbitMQ.Client.Framing.Impl.v0_9.ConnectionCloseOk.ClassId;
     replyMethodId = RabbitMQ.Client.Framing.Impl.v0_9.ConnectionCloseOk.MethodId;
 }
開發者ID:parshim,項目名稱:rabbitmq-dotnet-client,代碼行數:12,代碼來源:ProtocolBase.cs

示例3: HandleCommand

 public void HandleCommand(ISession session, Command cmd)
 {
     if (DispatchAsynchronous(cmd))
     {
         // Was asynchronous. Already processed. No need to process further.
     }
     else
     {
         m_continuationQueue.Next().HandleCommand(cmd);
     }
 }
開發者ID:DarthZar,項目名稱:rabbitmq-dotnet-client,代碼行數:11,代碼來源:ModelBase.cs

示例4: CanSendWhileClosed

 public override bool CanSendWhileClosed(Command cmd)
 {
     return cmd.m_method is RabbitMQ.Client.Framing.Impl.v0_9.ChannelCloseOk;
 }
開發者ID:parshim,項目名稱:rabbitmq-dotnet-client,代碼行數:4,代碼來源:ProtocolBase.cs

示例5: HandleCommand

 public virtual void HandleCommand(Command cmd)
 {
     m_cell.Value = Either.Left(cmd);
 }
開發者ID:DarthZar,項目名稱:rabbitmq-dotnet-client,代碼行數:4,代碼來源:SimpleBlockingRpcContinuation.cs

示例6: CreateConnectionClose

 ///<summary>Used when a connection is being quiesced because
 ///of a HardProtocolException or Application initiated shutdown</summary>
 public abstract void CreateConnectionClose(ushort reasonCode,
     string reasonText,
     out Command request,
     out int replyClassId,
     out int replyMethodId);
開發者ID:tomasz-zuber,項目名稱:rabbitmq-dotnet-client,代碼行數:7,代碼來源:AbstractProtocolBase.cs

示例7: CanSendWhileClosed

 ///<summary>Used in the quiescing session to determine if the command
 ///is allowed to be sent.</summary>
 public abstract bool CanSendWhileClosed(Command cmd);
開發者ID:tomasz-zuber,項目名稱:rabbitmq-dotnet-client,代碼行數:3,代碼來源:AbstractProtocolBase.cs

示例8: TransmitAndEnqueue

 public void TransmitAndEnqueue(Command cmd, IRpcContinuation k)
 {
     Enqueue(k);
     try
     {
         m_session.Transmit(cmd);
     }
     catch (AlreadyClosedException)
     {
         // Ignored, since the continuation will be told about
         // the closure via an OperationInterruptedException because
         // of the shutdown event propagation.
     }
 }
開發者ID:TheHunter,項目名稱:rabbitmq-dotnet-client,代碼行數:14,代碼來源:ModelBase.cs

示例9: HandleCommand

 public void HandleCommand(ISession session, Command cmd)
 {
     m_delegate.HandleCommand(session, cmd);
 }
開發者ID:ru-sh,項目名稱:rabbitmq-dotnet-client,代碼行數:4,代碼來源:AutorecoveringModel.cs

示例10: DispatchAsynchronous

 public bool DispatchAsynchronous(Command cmd)
 {
     return m_delegate.DispatchAsynchronous(cmd);
 }
開發者ID:ru-sh,項目名稱:rabbitmq-dotnet-client,代碼行數:4,代碼來源:AutorecoveringModel.cs

示例11: Transmit

 public virtual void Transmit(Command cmd)
 {
     lock (m_shutdownLock)
     {
         if (m_closeReason != null)
         {
             if (!m_connection.Protocol.CanSendWhileClosed(cmd))
           	    throw new AlreadyClosedException(m_closeReason);
         }
         // We transmit *inside* the lock to avoid interleaving
         // of frames within a channel.
         cmd.Transmit(m_channelNumber, m_connection);
     }
 }
開發者ID:REALTOBIZ,項目名稱:mono,代碼行數:14,代碼來源:SessionBase.cs

示例12: Transmit

 public override void Transmit(Command cmd)
 {
     lock(m_closingLock)
     {
         if (!m_closing)
         {
             base.Transmit(cmd);
             return;
         }
     }
      
     // Allow always for sending close ok
     // Or if application initiated, allow also for sending close
     MethodBase method = cmd.m_method;
     if ( ((method.ProtocolClassId == m_closeOkClassId)
           && (method.ProtocolMethodId == m_closeOkMethodId))
           || (!m_closeServerInitiated && (
               (method.ProtocolClassId == m_closeClassId) &&
               (method.ProtocolMethodId == m_closeMethodId))
               ))
     {
         base.Transmit(cmd);
         return;
     }
 }
開發者ID:nlhepler,項目名稱:mono,代碼行數:25,代碼來源:MainSession.cs

示例13: CreateConnectionClose

 public void CreateConnectionClose(ushort reasonCode,
     string reasonText,
     out Command request,
     out int replyClassId,
     out int replyMethodId)
 {
     request = new Command(new Impl.ConnectionClose(reasonCode,
         reasonText,
         0, 0));
     replyClassId = Impl.ConnectionCloseOk.ClassId;
     replyMethodId = Impl.ConnectionCloseOk.MethodId;
 }
開發者ID:rabbitmq,項目名稱:rabbitmq-dotnet-client,代碼行數:12,代碼來源:ProtocolBase.cs

示例14: CanSendWhileClosed

 public bool CanSendWhileClosed(Command cmd)
 {
     return cmd.Method is Impl.ChannelCloseOk;
 }
開發者ID:rabbitmq,項目名稱:rabbitmq-dotnet-client,代碼行數:4,代碼來源:ProtocolBase.cs

示例15: TransmitAndEnqueue

 public void TransmitAndEnqueue(Command cmd, IRpcContinuation k)
 {
     Enqueue(k);
     m_session.Transmit(cmd);
 }
開發者ID:DarthZar,項目名稱:rabbitmq-dotnet-client,代碼行數:5,代碼來源:ModelBase.cs


注:本文中的RabbitMQ.Client.Impl.Command類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。