private static void OnAddressResolved(object o, HostAddressArgs args) { objects.Remove (o); Console.WriteLine ("Resolved {0} to {1}", args.Address, args.Host); HostNameResolver hr = new HostNameResolver (client, args.Host); objects.Add (hr); hr.Found += OnHostNameResolved; }
private static void OnHostNameResolved(object o, HostAddressArgs args) { objects.Remove (o); Console.WriteLine ("Resolved {0} to {1}", args.Host, args.Address); }