Beispiel #1
0
        public Task UnregisterForwardingAsync <TCommand>()
        {
            var message = new UnregisterCommandForwarding(typeof(TCommand));

            Console.WriteLine($"Sending 'UnregisterCommandForwarding' for command type '{message.CommandType.FullName}'.");

            return(_messageEndPoint.SendAsync(message));
        }
Beispiel #2
0
        public Task HandleAsync(UnregisterCommandForwarding message)
        {
            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }

            Console.WriteLine($"Received 'UnregisterCommandForwarding' for command type '{message.CommandType.FullName}'.");

            return(_commandDispatcher.UnregisterForwardingAsync(message.CommandType));
        }