Code inspections

This commit is contained in:
2019-10-01 18:55:20 +01:00
parent 9969fce375
commit 12e46edc74
4 changed files with 7 additions and 5 deletions
+2 -2
View File
@@ -14,9 +14,9 @@ using ASCOM.DriverAccess;
namespace ASCOM.MeadeGeneric
{
class Program
public class Program
{
static void Main(string[] args)
public static void Main()
{
// Uncomment the code that's required
#if UseChooser
+1 -1
View File
@@ -42,7 +42,7 @@ namespace ASCOM.Meade.net
/// The DeviceID is used by ASCOM applications to load the driver at runtime.
/// </summary>
//internal static string driverID = "ASCOM.Meade.net.Telescope";
private static readonly string DriverId = Marshal.GenerateProgIdForType(MethodBase.GetCurrentMethod().DeclaringType);
private static readonly string DriverId = Marshal.GenerateProgIdForType(MethodBase.GetCurrentMethod().DeclaringType ?? throw new System.InvalidOperationException());
// TODO Change the descriptive string for your driver then remove this line
/// <summary>
+2
View File
@@ -175,6 +175,8 @@ namespace ASCOM.Meade.net
// put everything into one folder, the same as the server.
string assyPath = Assembly.GetEntryAssembly().Location;
assyPath = Path.GetDirectoryName(assyPath);
if (assyPath == null)
throw new System.InvalidOperationException();
DirectoryInfo d = new DirectoryInfo(assyPath);
foreach (FileInfo fi in d.GetFiles("*.dll"))
+2 -2
View File
@@ -13,9 +13,9 @@ using ASCOM.DriverAccess;
namespace ASCOM.Meade.net
{
class Program
public class Program
{
static void Main(string[] args)
public static void Main()
{
// Uncomment the code that's required
#if UseChooser