Example #1
0
        public Task NotifyActivationAsync()
        {
            var message = new ActivateQueryForwarding(typeof(TQuery));

            Console.WriteLine($"Sending 'ActivateQueryForwarding' for query type '{message.QueryType.FullName}'.");

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

            Console.WriteLine($"Received 'ActivateQueryForwarding' for query type '{message.QueryType.FullName}'.");

            _remoteQueryDispatcher.NotifyForwardingActive(message.QueryType);

            return(Task.CompletedTask);
        }