summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CSharp/Ivy/Ivy/Ivy.cs20
1 files changed, 8 insertions, 12 deletions
diff --git a/CSharp/Ivy/Ivy/Ivy.cs b/CSharp/Ivy/Ivy/Ivy.cs
index c8bf9d2..0624b1a 100644
--- a/CSharp/Ivy/Ivy/Ivy.cs
+++ b/CSharp/Ivy/Ivy/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