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 ASCOM.DriverAccess;
namespace ASCOM
namespace ASCOM.MeadeGeneric
{
class Program
{
+1 -1
View File
@@ -349,7 +349,7 @@ namespace ASCOM.Meade.net
private bool FirmwareIsGreaterThan(string minVersion)
{
var currentVersion = _sharedResourcesWrapper.FirmwareVersion;
var comparison = currentVersion.CompareTo(minVersion);
var comparison = String.Compare(currentVersion, minVersion, StringComparison.Ordinal);
return (comparison >= 0);
}
+4 -4
View File
@@ -33,8 +33,8 @@ namespace ASCOM.Meade.net
#region Access to ole32.dll functions for class factories
// Define two common GUID objects for public usage.
private static Guid _iidIUnknown = new Guid("{00000000-0000-0000-C000-000000000046}");
private static Guid _iidIDispatch = new Guid("{00020400-0000-0000-C000-000000000046}");
private static readonly Guid _iidIUnknown = new Guid("{00000000-0000-0000-C000-000000000046}");
private static readonly Guid _iidIDispatch = new Guid("{00020400-0000-0000-C000-000000000046}");
[Flags]
enum Clsctx : uint
@@ -136,7 +136,7 @@ namespace ASCOM.Meade.net
#endregion
#region Common ClassFactory Methods
public uint ClassContext { get; set; }
public uint ClassContext { get; }
public Guid ClassId
{
@@ -144,7 +144,7 @@ namespace ASCOM.Meade.net
set => _mClassId = value;
}
public uint Flags { get; set; }
public uint Flags { get; }
public bool RegisterClassObject()
{
+1 -1
View File
@@ -8,7 +8,7 @@ namespace ASCOM.Meade.net.Localization
internal class LocalisationHelper
{
private const string LocalizationNamespace = "LocalisationTest.Localization.Resources.Localization";
ResourceManager _resourceManager;
private readonly ResourceManager _resourceManager;
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,
/// USB ID or IP Address, the Value is the DeviceHardware class
/// </summary>
private static Dictionary<string, DeviceHardware> _connectedDevices = new Dictionary<string, DeviceHardware>();
private static readonly Dictionary<string, DeviceHardware> _connectedDevices = new Dictionary<string, DeviceHardware>();
/// <summary>
/// This is called in the driver Connect(true) property,
+1 -1
View File
@@ -10,7 +10,7 @@
using System;
namespace ASCOM
namespace ASCOM.Meade.net
{
class Program
{