示例#1
0
        public Task NotifyActivationAsync()
        {
            var message = new ActivateEventForwarding(typeof(TEvent));

            Console.WriteLine($"Sending 'ActivateEventForwarding' for event type '{message.EventType.FullName}'.");

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

            Console.WriteLine($"Receiving 'ActivateEventForwarding' for event type '{message.EventType.FullName}'.");

            _remoteEventDispatcher.NotifyForwardingActive(message.EventType);

            return(Task.CompletedTask);
        }