summaryrefslogtreecommitdiff
path: root/CSharp/Ivy/IvyPPC
diff options
context:
space:
mode:
authorfcolin2007-02-01 09:55:26 +0000
committerfcolin2007-02-01 09:55:26 +0000
commit26346a8146f1474f1cded6509e6f3c7053a7b659 (patch)
treeac1fe4def6bc261cd98612331839cbfdd644d126 /CSharp/Ivy/IvyPPC
parent16a209be08cb27b14789a3abb5f88ef855ef2d0c (diff)
downloadivy-csharp-26346a8146f1474f1cded6509e6f3c7053a7b659.zip
ivy-csharp-26346a8146f1474f1cded6509e6f3c7053a7b659.tar.gz
ivy-csharp-26346a8146f1474f1cded6509e6f3c7053a7b659.tar.bz2
ivy-csharp-26346a8146f1474f1cded6509e6f3c7053a7b659.tar.xz
Utilisateur : Fcolin Date : 6/02/06 Heure : 17:12 Archivé dans $/CSharp/Ivy/Ivy Commentaire: utilisation generale de traceDEbug et System.Diagnostics (vss 45)
Diffstat (limited to 'CSharp/Ivy/IvyPPC')
-rw-r--r--CSharp/Ivy/IvyPPC/Ivy.cs20
1 files changed, 8 insertions, 12 deletions
diff --git a/CSharp/Ivy/IvyPPC/Ivy.cs b/CSharp/Ivy/IvyPPC/Ivy.cs
index c8bf9d2..0624b1a 100644
--- a/CSharp/Ivy/IvyPPC/Ivy.cs
+++ b/CSharp/Ivy/IvyPPC/Ivy.cs
@@ -71,7 +71,7 @@ namespace IvyBus
[Bindable(true)]
[DefaultValue(false)]
#endif
- public bool VerboseDebug
+ public static bool VerboseDebug
{
get
{
@@ -237,7 +237,7 @@ namespace IvyBus
}
#if (!PocketPC)
- [CategoryAttibute("Ivy")]
+ [Category("Ivy")]
[DefaultValue(null)]
#endif
public Control SyncControl
@@ -271,7 +271,7 @@ namespace IvyBus
private static readonly string DEFAULT_DOMAIN = "127.255.255.255:" + DEFAULT_PORT;
private const string libVersion = "2.0.0";
internal int protocolVersion = 3;
- private bool debug = false;
+ private static bool debug = false;
private static ushort serial = 0; /* an unique ID for each regexp */
private MyTcpListener app;
private List<IvyWatcher> watchers;
@@ -436,7 +436,7 @@ namespace IvyBus
Thread.Sleep(100);
#else
// Wait for readyness
- while ( serverThread.ThreadState != ThreadState.Running || !app.IsActive())
+ while ( serverThread.ThreadState != System.Threading.ThreadState.Running || !app.IsActive())
{
traceDebug( " Ivy Threading start in progress..." );
Thread.Sleep( 100 );
@@ -920,10 +920,7 @@ namespace IvyBus
}
catch (IOException e)
{
-
- traceDebug("Error IvyServer exception: " + e.Message);
- Console.WriteLine("Ivy server socket reader caught an exception " + e.Message);
- // e.printStackTrace();
+ traceDebug("Ivy server socket reader caught an exception: " + e.Message);
}
catch (SocketException e)
{
@@ -934,11 +931,10 @@ namespace IvyBus
traceDebug("Ivy service Thread stopped");
}
-
- internal void traceDebug(string s)
+ [Conditional("DEBUG")]
+ private void traceDebug(string s)
{
- if (debug)
- Console.WriteLine("-->ivy<-- " + s);
+ Trace.WriteLineIf(debug, "-->ivy<-- " + s);
}
internal class Domain