Code inspections

This commit is contained in:
2019-07-19 14:42:25 +01:00
parent 0e98f0e370
commit ac887ccdff
6 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ using System;
using System.Threading; using System.Threading;
using ASCOM.DriverAccess; using ASCOM.DriverAccess;
namespace ASCOM namespace ASCOM.MeadeGeneric
{ {
class Program class Program
{ {
+1 -1
View File
@@ -349,7 +349,7 @@ namespace ASCOM.Meade.net
private bool FirmwareIsGreaterThan(string minVersion) private bool FirmwareIsGreaterThan(string minVersion)
{ {
var currentVersion = _sharedResourcesWrapper.FirmwareVersion; var currentVersion = _sharedResourcesWrapper.FirmwareVersion;
var comparison = currentVersion.CompareTo(minVersion); var comparison = String.Compare(currentVersion, minVersion, StringComparison.Ordinal);
return (comparison >= 0); return (comparison >= 0);
} }
+4 -4
View File
@@ -33,8 +33,8 @@ namespace ASCOM.Meade.net
#region Access to ole32.dll functions for class factories #region Access to ole32.dll functions for class factories
// Define two common GUID objects for public usage. // Define two common GUID objects for public usage.
private static Guid _iidIUnknown = new Guid("{00000000-0000-0000-C000-000000000046}"); private static readonly Guid _iidIUnknown = new Guid("{00000000-0000-0000-C000-000000000046}");
private static Guid _iidIDispatch = new Guid("{00020400-0000-0000-C000-000000000046}"); private static readonly Guid _iidIDispatch = new Guid("{00020400-0000-0000-C000-000000000046}");
[Flags] [Flags]
enum Clsctx : uint enum Clsctx : uint
@@ -136,7 +136,7 @@ namespace ASCOM.Meade.net
#endregion #endregion
#region Common ClassFactory Methods #region Common ClassFactory Methods
public uint ClassContext { get; set; } public uint ClassContext { get; }
public Guid ClassId public Guid ClassId
{ {
@@ -144,7 +144,7 @@ namespace ASCOM.Meade.net
set => _mClassId = value; set => _mClassId = value;
} }
public uint Flags { get; set; } public uint Flags { get; }
public bool RegisterClassObject() public bool RegisterClassObject()
{ {
+1 -1
View File
@@ -8,7 +8,7 @@ namespace ASCOM.Meade.net.Localization
internal class LocalisationHelper internal class LocalisationHelper
{ {
private const string LocalizationNamespace = "LocalisationTest.Localization.Resources.Localization"; private const string LocalizationNamespace = "LocalisationTest.Localization.Resources.Localization";
ResourceManager _resourceManager; private readonly ResourceManager _resourceManager;
public LocalisationHelper() public LocalisationHelper()
{ {
+1 -1
View File
@@ -244,7 +244,7 @@ namespace ASCOM.Meade.net
/// The Key is the connection number that identifies the device, it could be the COM port name, /// The Key is the connection number that identifies the device, it could be the COM port name,
/// USB ID or IP Address, the Value is the DeviceHardware class /// USB ID or IP Address, the Value is the DeviceHardware class
/// </summary> /// </summary>
private static Dictionary<string, DeviceHardware> _connectedDevices = new Dictionary<string, DeviceHardware>(); private static readonly Dictionary<string, DeviceHardware> _connectedDevices = new Dictionary<string, DeviceHardware>();
/// <summary> /// <summary>
/// This is called in the driver Connect(true) property, /// This is called in the driver Connect(true) property,
+1 -1
View File
@@ -10,7 +10,7 @@
using System; using System;
namespace ASCOM namespace ASCOM.Meade.net
{ {
class Program class Program
{ {