@@ -14,14 +14,29 @@ namespace nanoFramework.Logging.Serial
1414    public  class  SerialLoggerFactory  :  ILoggerFactory 
1515    { 
1616        private  SerialDevice  _serial ; 
17-         private  string  _comPort ; 
18-         private  uint  _baudRate ; 
19-         private  ushort  _dataBits ; 
20-         private  SerialParity  _parity ; 
21-         private  SerialStopBitCount  _stopBits ; 
22-         private  SerialHandshake  _handshake ; 
17+         private  readonly   string  _comPort ; 
18+         private  readonly   uint  _baudRate ; 
19+         private  readonly   ushort  _dataBits ; 
20+         private  readonly   SerialParity  _parity ; 
21+         private  readonly   SerialStopBitCount  _stopBits ; 
22+         private  readonly   SerialHandshake  _handshake ; 
2323
24-         public  SerialLoggerFactory ( string  comPort ,  uint  baudRate  =  9600 ,  ushort  dataBits  =  8 ,  SerialParity  parity  =  SerialParity . None ,  SerialStopBitCount  stopBits  =  SerialStopBitCount . One ,  SerialHandshake  handshake  =  SerialHandshake . None ) 
24+         /// <summary> 
25+         /// Create a new instance of <see cref="SerialLoggerFactory"/> from a <see cref="SerialDevice"/>. 
26+         /// </summary> 
27+         /// <param name="comPort"></param> 
28+         /// <param name="baudRate"></param> 
29+         /// <param name="dataBits"></param> 
30+         /// <param name="parity"></param> 
31+         /// <param name="stopBits"></param> 
32+         /// <param name="handshake"></param> 
33+         public  SerialLoggerFactory ( 
34+             string  comPort , 
35+             uint  baudRate  =  9600 , 
36+             ushort  dataBits  =  8 , 
37+             SerialParity  parity  =  SerialParity . None , 
38+             SerialStopBitCount  stopBits  =  SerialStopBitCount . One , 
39+             SerialHandshake  handshake  =  SerialHandshake . None ) 
2540        { 
2641            _comPort  =  comPort ; 
2742            _baudRate  =  baudRate ; 
0 commit comments