コード例 #1
0
 /// <summary>
 /// Creates an RPC module for sending responses if one does not already exist.
 /// </summary>
 /// <remarks>The connection is used as the key</remarks>
 /// <param name="connection">The connection.</param>
 private void CreateRpcModuleIfNeeded(IConnectionInformation connection)
 {
     lock (_rpcLock)
     {
         if (!_rpcQueues.ContainsKey(connection))
         {
             _rpcQueues.Add(connection,
                            _queueContainer.CreateProducerRpc <object>(connection.QueueName,
                                                                       connection.ConnectionString));
         }
     }
 }