コード例 #1
0
        public async Task AddRouteAsync(IAgentContext agentContext, string routeDestination)
        {
            var connection = await GetMediatorConnectionAsync(agentContext);

            if (connection != null)
            {
                var createInboxMessage = new AddRouteMessage {
                    RouteDestination = routeDestination
                };
                await messageService.SendAsync(agentContext.Wallet, createInboxMessage, connection);
            }
        }
コード例 #2
0
        private async Task AddRouteAsync(IAgentContext _, ConnectionRecord connection, AddRouteMessage addRouteMessage)
        {
            var inboxId = connection.GetTag("InboxId");

            await routingStore.AddRouteAsync(addRouteMessage.RouteDestination, inboxId);
        }