diff options
author | fcolin | 2007-02-01 09:43:27 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 09:43:27 +0000 |
commit | eb9ab103075dc521f0d6731f8811a866251d70a8 (patch) | |
tree | 39dba4423e0b23bf757dc705aae4e82e42d4ef8f | |
parent | ec0a81c0cfc3bf0a2a7c81163ca8afd378d65c7a (diff) | |
download | ivy-csharp-eb9ab103075dc521f0d6731f8811a866251d70a8.zip ivy-csharp-eb9ab103075dc521f0d6731f8811a866251d70a8.tar.gz ivy-csharp-eb9ab103075dc521f0d6731f8811a866251d70a8.tar.bz2 ivy-csharp-eb9ab103075dc521f0d6731f8811a866251d70a8.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)
-rw-r--r-- | CSharp/Ivy/Ivy/Ivy.cs | 20 |
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
|