mirror of
https://github.com/dotMorten/NmeaParser.git
synced 2025-12-06 07:12:04 +01:00
Cleanup
This commit is contained in:
parent
18e6899911
commit
16da0c7eb4
|
|
@ -29,8 +29,9 @@ namespace NmeaParser
|
|||
/// </summary>
|
||||
public abstract class BufferedStreamDevice : NmeaDevice
|
||||
{
|
||||
BufferedStream m_stream;
|
||||
int m_readSpeed;
|
||||
private BufferedStream m_stream;
|
||||
private readonly int m_readSpeed;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BufferedStreamDevice"/> class.
|
||||
/// </summary>
|
||||
|
|
@ -80,10 +81,10 @@ namespace NmeaParser
|
|||
// in lastLineRead by lastLineRead at a steady stream
|
||||
private class BufferedStream : Stream
|
||||
{
|
||||
private StreamReader m_sr;
|
||||
private readonly StreamReader m_sr;
|
||||
private byte[] m_buffer = new byte[0];
|
||||
private System.Threading.Timer m_timer;
|
||||
private object lockObj = new object();
|
||||
private readonly System.Threading.Timer m_timer;
|
||||
private readonly object lockObj = new object();
|
||||
private string groupToken = null;
|
||||
private string lastLineRead = null;
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
namespace NmeaParser.Nmea.Glonass
|
||||
{
|
||||
/// <summary>
|
||||
/// Date and time of fix
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Glzda")]
|
||||
[NmeaMessageType("GLZDA")]
|
||||
public class Glzda : Zda
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
namespace NmeaParser.Nmea.Gnss
|
||||
{
|
||||
/// <summary>
|
||||
/// Date and time of fix
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gnzda")]
|
||||
[NmeaMessageType("GNZDA")]
|
||||
public class Gnzda : Zda
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
namespace NmeaParser.Nmea.Gps
|
||||
{
|
||||
/// <summary>
|
||||
/// Date and time of fix
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gpzda")]
|
||||
[NmeaMessageType("GPZDA")]
|
||||
public class Gpzda : Zda
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace NmeaParser.Nmea
|
|||
/// </summary>
|
||||
public abstract class NmeaMessage
|
||||
{
|
||||
private static Dictionary<string, ConstructorInfo> messageTypes;
|
||||
private readonly static Dictionary<string, ConstructorInfo> messageTypes;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes an instance of the NMEA message
|
||||
|
|
@ -199,8 +199,7 @@ namespace NmeaParser.Nmea
|
|||
|
||||
internal static double StringToDouble(string value)
|
||||
{
|
||||
double result = double.NaN;
|
||||
if(value != null && double.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out result))
|
||||
if(value != null && double.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out double result))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace NmeaParser
|
|||
/// </summary>
|
||||
public abstract class NmeaDevice : IDisposable
|
||||
{
|
||||
private object m_lockObject = new object();
|
||||
private readonly object m_lockObject = new object();
|
||||
private string m_message = "";
|
||||
private Stream m_stream;
|
||||
private CancellationTokenSource m_cts;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@ namespace NmeaParser
|
|||
/// </summary>
|
||||
public class StreamDevice : NmeaDevice
|
||||
{
|
||||
System.IO.Stream m_stream;
|
||||
private Stream m_stream;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StreamDevice"/> class.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue