From 10ae907d7c0290e65a360a163b2bb0dfcf107db3 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 10:08:04 +0000 Subject: Utilisateur : Fcolin Date : 30/11/05 Heure : 10:27 Archivé dans $/CSharp/Ivy/IvyProbe Commentaire: (vss 4) --- CSharp/Ivy/IvyProbeConsole/IvyProbeConsole.cs | 32 +++++++++++++-------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'CSharp/Ivy') diff --git a/CSharp/Ivy/IvyProbeConsole/IvyProbeConsole.cs b/CSharp/Ivy/IvyProbeConsole/IvyProbeConsole.cs index 3f2673a..2c1f82d 100644 --- a/CSharp/Ivy/IvyProbeConsole/IvyProbeConsole.cs +++ b/CSharp/Ivy/IvyProbeConsole/IvyProbeConsole.cs @@ -46,16 +46,16 @@ namespace IvyProbe String domain = Ivy.getDomain(null); bool debug = false; - if ( ConfigurationSettings.AppSettings["domain"] != null ) - domain = ConfigurationSettings.AppSettings["domain"]; - if ( ConfigurationSettings.AppSettings["name"] != null ) - name = ConfigurationSettings.AppSettings["name"]; - if ( ConfigurationSettings.AppSettings["quiet"] != null ) - quiet = bool.Parse(ConfigurationSettings.AppSettings["quiet"]); - if ( ConfigurationSettings.AppSettings["timestamp"] != null ) - timestamp = bool.Parse(ConfigurationSettings.AppSettings["timestamp"]); - if ( ConfigurationSettings.AppSettings["IVY_DEBUG"] != null ) - debug = bool.Parse(ConfigurationSettings.AppSettings["IVY_DEBUG"] ); + if ( ConfigurationManager.AppSettings["domain"] != null ) + domain = ConfigurationManager.AppSettings["domain"]; + if (ConfigurationManager.AppSettings["name"] != null) + name = ConfigurationManager.AppSettings["name"]; + if (ConfigurationManager.AppSettings["quiet"] != null) + quiet = bool.Parse(ConfigurationManager.AppSettings["quiet"]); + if (ConfigurationManager.AppSettings["timestamp"] != null) + timestamp = bool.Parse(ConfigurationManager.AppSettings["timestamp"]); + if (ConfigurationManager.AppSettings["IVY_DEBUG"] != null) + debug = bool.Parse(ConfigurationManager.AppSettings["IVY_DEBUG"]); /* Getopt opt = new Getopt("Probe", args, "n:b:dqht"); @@ -194,7 +194,7 @@ namespace IvyProbe if (v.Count == 0) println("no Ivy client with the name \"" + target + "\""); for (int i = 0; i < v.Count; i++) - ((IvyClient) v[i]).sendDie(); + ((IvyClient) v[i]).sendDie(".die command"); } else if (s.LastIndexOf(".unbind ") >= 0) { @@ -235,7 +235,7 @@ namespace IvyProbe else if (s.LastIndexOf(".list") >= 0) { println(bus.IvyClients.Count + " clients on the bus"); - foreach (IvyClient client in bus.IvyClients.Values ) + foreach (IvyClient client in bus.IvyClients ) { println("-> " + client.ApplicationName); } @@ -279,16 +279,14 @@ namespace IvyProbe return true; } - private void directMessage(IvyClient client, int id, String arg) + private void directMessage(IvyClient client, int id, byte[] arg) { println(client.ApplicationName + " direct Message " + id + arg); } - private void receive(IvyClient client, String[] args) + private void receive(IvyClient client, IvyArgument args) { - String s = client.ApplicationName + " sent"; - for (int i = 0; i < args.Length; i++) - s += " '" + args[i] + "'"; + String s = client.ApplicationName + " sent" + args.ToString(); println(s); } -- cgit v1.1