private static void sender_Sending(object sender, DistributingEventArgs e) { var sendStrategy = sender as IDispatcher; Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine(); Console.Write(@"----------------------------------"); Console.Write(@"发送开始"); Console.Write(@"----------------------------------"); Console.WriteLine(); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine(string.Format("目标节点 {0} 转移策略 {1}", e.Context.ClientAgent.Name, e.Context.ClientAgent.Transfer.Name)); Console.WriteLine(string.Format("目标地址 {0}", e.Context.Responder.Transfer.GetAddress(e.Context.Responder))); Console.ForegroundColor = ConsoleColor.Gray; }
private static void sender_Sending(object sender, DistributingEventArgs e) { var sendStrategy = sender as IDispatcher; Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine(); Console.Write(@"----------------------------------"); Console.Write(@"发送开始"); Console.Write(@"----------------------------------"); Console.WriteLine(); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine(string.Format("目标节点 {0} 转移策略 {1}", e.Context.ClientAgent.Name, e.Context.ClientAgent.Transfer.Name)); Console.WriteLine(string.Format("目标地址 {0}", e.Context.Responder.Transfer.GetAddress(e.Context.Responder))); Console.ForegroundColor = ConsoleColor.Gray; }