public void EnqueueMessage(IRequestMessage requestMessage, IMessageResponseCollector responseCollector = null) { lock (_syncLock) { _unhandledMessages.Enqueue(requestMessage); _resultBuilders.Enqueue(responseCollector); } }
public void Enqueue(IRequestMessage message1, IMessageResponseCollector responseCollector, IRequestMessage message2 = null) { try { Delegate.Enqueue(message1, responseCollector, message2); } catch (Exception e) { OnError(e); } }
private void Enqueue(IRequestMessage requestMessage, IMessageResponseCollector resultBuilder = null, IRequestMessage requestStreamingMessage = null) { _messages.Enqueue(requestMessage); _responseHandler.EnqueueMessage(requestMessage, resultBuilder); if (requestStreamingMessage != null) { _messages.Enqueue(requestStreamingMessage); _responseHandler.EnqueueMessage(requestStreamingMessage, resultBuilder); } }
private void Enqueue(IRequestMessage requestMessage, IMessageResponseCollector resultBuilder = null, IRequestMessage requestStreamingMessage = null) { lock (_syncLock) { EnsureNotInterrupted(); _messages.Enqueue(requestMessage); _responseHandler.EnqueueMessage(requestMessage, resultBuilder); if (requestStreamingMessage != null) { _messages.Enqueue(requestStreamingMessage); _responseHandler.EnqueueMessage(requestStreamingMessage, resultBuilder); } } }
public void Run(string statement, IDictionary <string, object> paramters = null, IMessageResponseCollector resultBuilder = null, bool pullAll = true) { if (pullAll) { Enqueue(new RunMessage(statement, paramters), resultBuilder, new PullAllMessage()); } else { Enqueue(new RunMessage(statement, paramters), resultBuilder, new DiscardAllMessage()); } }
public void Run(string statement, IDictionary <string, object> parameters = null, IMessageResponseCollector resultBuilder = null, bool pullAll = true) { try { Delegate.Run(statement, parameters, resultBuilder, pullAll); } catch (Exception e) { OnError(e); } }
public void Run(string statement, IDictionary <string, object> parameters = null, IMessageResponseCollector resultBuilder = null, bool pullAll = false) { _connection.Run(statement, parameters, resultBuilder, pullAll); }
public void EnqueueMessage(IRequestMessage requestMessage, IMessageResponseCollector responseCollector = null) { _messageHandler.EnqueueMessage(requestMessage, responseCollector); }