Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=79279

--- shadow/79279        2006-09-04 14:46:24.000000000 -0400
+++ shadow/79279.tmp.1131       2006-09-04 14:46:24.000000000 -0400
@@ -0,0 +1,40 @@
+Bug#: 79279
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.IO.Ports.SerialPort ReadLine behaviour differs from MS .NET 
implementation
+
+System.IO.Ports.SerialPort ReadLine behaviour differs from the MS .NET
+implementation. The MS implementation uses the string represented by the
+NewLine property in order to determine the end of line whereas the Mono
+implementation looks for a fixed \n.
+
+At the moment we're using a simple modification to the current implementation:
+
+                       CheckOpen ();
+                       List<byte> bytes_read = new List<byte>();
+                       byte [] buff = new byte [1];
+
+                       if(new_line.Length != 1)
+                               throw new NotImplementedException("Only single 
character NewLine
+strings are supported for reading lines.");
+                       
+                       while (true){
+                               int n = stream.Read (buff, 0, 1);
+                               if (n == -1 || buff [0] == new_line[0])
+                                       break;
+                               bytes_read.Add (buff [0]);
+                       } 
+                       return new String (encoding.GetChars 
(bytes_read.ToArray ()));
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to