Code inspections
This commit is contained in:
@@ -19,7 +19,7 @@ namespace ASCOM.Meade.net
|
||||
//public readonly bool IsComVisible;
|
||||
|
||||
// Return a particular assembly attribute value.
|
||||
public static T GetAssemblyAttribute<T>(Assembly assembly)
|
||||
private T GetAssemblyAttribute<T>(Assembly assembly)
|
||||
where T : Attribute
|
||||
{
|
||||
// Get attributes of this type.
|
||||
@@ -40,7 +40,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
}
|
||||
|
||||
public AssemblyInfo(Assembly assembly)
|
||||
private AssemblyInfo(Assembly assembly)
|
||||
{
|
||||
// Get values from the assembly.
|
||||
//var titleAttr = GetAssemblyAttribute<AssemblyTitleAttribute>(assembly);
|
||||
|
||||
@@ -135,7 +135,8 @@ namespace ASCOM.Meade.net
|
||||
#endregion
|
||||
|
||||
#region Common ClassFactory Methods
|
||||
public uint ClassContext { get; }
|
||||
|
||||
private uint ClassContext { get; }
|
||||
|
||||
public Guid ClassId
|
||||
{
|
||||
@@ -143,7 +144,7 @@ namespace ASCOM.Meade.net
|
||||
set => _mClassId = value;
|
||||
}
|
||||
|
||||
public uint Flags { get; }
|
||||
private uint Flags { get; }
|
||||
|
||||
public bool RegisterClassObject()
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace ASCOM.Meade.net
|
||||
_mEventThreadEnded.Set();
|
||||
}
|
||||
|
||||
protected bool ContinueThread()
|
||||
private bool ContinueThread()
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
|
||||
@@ -72,15 +72,15 @@ namespace ASCOM.Meade.net
|
||||
#endregion
|
||||
|
||||
// This property returns the main thread's id.
|
||||
public static uint MainThreadId { get; private set; } // Stores the main thread's thread id.
|
||||
private static uint MainThreadId { get; set; } // Stores the main thread's thread id.
|
||||
|
||||
// Used to tell if started by COM or manually
|
||||
public static bool StartedByCom { get; private set; } // True if server started by COM (-embedding)
|
||||
private static bool StartedByCom { get; set; } // True if server started by COM (-embedding)
|
||||
|
||||
|
||||
#region Server Lock, Object Counting, and AutoQuit on COM startup
|
||||
// Returns the total number of objects alive currently.
|
||||
public static int ObjectsCount
|
||||
private static int ObjectsCount
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -106,7 +106,7 @@ namespace ASCOM.Meade.net
|
||||
}
|
||||
|
||||
// Returns the current server lock count.
|
||||
public static int ServerLockCount
|
||||
private static int ServerLockCount
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace ASCOM.Meade.net.Localization
|
||||
SetLocalisation(CultureInfo.CurrentCulture.Name);
|
||||
}
|
||||
|
||||
internal void SetLocalisation(string name)
|
||||
private void SetLocalisation(string name)
|
||||
{
|
||||
var cultureInfo = new CultureInfo(name);
|
||||
|
||||
|
||||
@@ -62,12 +62,12 @@ namespace ASCOM.Meade.net
|
||||
/// <summary>
|
||||
/// Shared serial port
|
||||
/// </summary>
|
||||
public static Serial SharedSerial => _sSharedSerial ?? (_sSharedSerial = new Serial());
|
||||
private static Serial SharedSerial => _sSharedSerial ?? (_sSharedSerial = new Serial());
|
||||
|
||||
/// <summary>
|
||||
/// number of connections to the shared serial port
|
||||
/// </summary>
|
||||
public static int Connections { get; set; }
|
||||
private static int Connections { get; set; }
|
||||
|
||||
public static void SendBlind(string message)
|
||||
{
|
||||
@@ -342,7 +342,7 @@ namespace ASCOM.Meade.net
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsConnected()
|
||||
private static bool IsConnected()
|
||||
{
|
||||
foreach (var device in ConnectedDevices)
|
||||
{
|
||||
@@ -382,7 +382,7 @@ namespace ASCOM.Meade.net
|
||||
/// Skeleton of a hardware class, all this does is hold a count of the connections,
|
||||
/// in reality extra code will be needed to handle the hardware in some way
|
||||
/// </summary>
|
||||
public class DeviceHardware
|
||||
private class DeviceHardware
|
||||
{
|
||||
internal int Count { set; get; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user