Sorted out some code inspection issues
This commit is contained in:
@@ -8,13 +8,13 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
public static string GetDescription(this Enum GenericEnum)
|
||||
{
|
||||
Type genericEnumType = GenericEnum.GetType();
|
||||
MemberInfo[] memberInfo = genericEnumType.GetMember(GenericEnum.ToString());
|
||||
if ((memberInfo != null && memberInfo.Length > 0))
|
||||
var genericEnumType = GenericEnum.GetType();
|
||||
var memberInfo = genericEnumType.GetMember(GenericEnum.ToString());
|
||||
if (memberInfo.Length > 0)
|
||||
{
|
||||
var _Attribs = memberInfo[0]
|
||||
.GetCustomAttributes(typeof(System.ComponentModel.DescriptionAttribute), false);
|
||||
if ((_Attribs != null && _Attribs.Count() > 0))
|
||||
if (_Attribs.Any())
|
||||
{
|
||||
return ((System.ComponentModel.DescriptionAttribute) _Attribs.ElementAt(0)).Description;
|
||||
}
|
||||
|
||||
@@ -100,10 +100,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
SharedSerial.ClearBuffers();
|
||||
|
||||
if (includePrefix)
|
||||
SharedSerial.Transmit( $"#{message}");
|
||||
else
|
||||
SharedSerial.Transmit(message);
|
||||
SharedSerial.Transmit(includePrefix ? $"#{message}" : message);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public const string Autostar497_43Eg = "43Eg";
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public const string AudioStar_A4S4 = "A4S4";
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user