Просмотр исходного кода

refactoring:
use Debug.WriteLine instead Console.WriteLine within #if DEBUG.

svn path=/trunk/mcs/; revision=92787

Igor Zelmanovich 18 лет назад
Родитель
Сommit
f74cf7db37
1 измененных файлов с 5 добавлено и 15 удалено
  1. 5 15
      mcs/class/System.Web/System.Web.Mail/SmtpStream.cs

+ 5 - 15
mcs/class/System.Web/System.Web.Mail/SmtpStream.cs

@@ -31,6 +31,7 @@ using System.IO;
 using System.Collections;
 using System.Text;
 using System.Security.Cryptography;
+using System.Diagnostics;
 
 namespace System.Web.Mail {
 
@@ -190,10 +191,8 @@ namespace System.Web.Mail {
 	    byte[] buffer = encoding.GetBytes( line + "\r\n" );
 	    
 	    stream.Write( buffer , 0 , buffer.Length );
-	
-	    #if DEBUG 
-	      DebugPrint( line );
-            #endif
+
+		Debug.WriteLine ("smtp: {0}", line);
 	}
 	
 	// read a line from the server
@@ -231,18 +230,9 @@ namespace System.Web.Mail {
 			
 	    // parse the line to the lastResponse object
 	    lastResponse = SmtpResponse.Parse (line);
-	   
-	    #if DEBUG
-	      DebugPrint( line );
-	    #endif
-	}
-	
-    #if DEBUG
-	/// debug printing 
-	private void DebugPrint( string line ) {
-	    Console.WriteLine( "smtp: {0}" , line );
+
+		Debug.WriteLine ("smtp: {0}", line);
 	}
-    #endif
 
     }