System.Collections.Concurrent.BlockingCollection.Add(DomainEventHandledMessage)

Here are the examples of the csharp api class System.Collections.Concurrent.BlockingCollection.Add(DomainEventHandledMessage) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: enode
Source File: CommandResultProcessor.cs
RemotingResponse IRequestHandler.HandleRequest(IRequestHandlerContext context, RemotingRequest remotingRequest)
        {
            if (remotingRequest.Code == (int)CommandReturnType.CommandExecuted)
            {
                var json = Encoding.UTF8.GetString(remotingRequest.Body);
                var result = _jsonSerializer.Deserialize<CommandResult>(json);
                _commandExecutedMessageLocalQueue.Add(result);
            }
            else if (remotingRequest.Code == (int)CommandReturnType.EventHandled)
            {
                var json = Encoding.UTF8.GetString(remotingRequest.Body);
                var message = _jsonSerializer.Deserialize<DomainEventHandledMessage>(json);
                _domainEventHandledMessageLocalQueue.Add(message);
            }
            else
            {
                _logger.ErrorFormat("Invalid remoting request code: {0}", remotingRequest.Code);
            }
            return null;
        }