Changes the code a little more
This commit is contained in:
@@ -54,7 +54,7 @@ namespace ASCOM.Meade.net.Wrapper
|
|||||||
|
|
||||||
public int GetValueInt(string driverId, string name, string subKey, string defaultValue)
|
public int GetValueInt(string driverId, string name, string subKey, string defaultValue)
|
||||||
{
|
{
|
||||||
var value = _profile.GetValue(driverId, name, subKey, defaultValue);
|
var value = GetValue(driverId, name, subKey, defaultValue);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return int.Parse(value, CultureInfo.InvariantCulture);
|
return int.Parse(value, CultureInfo.InvariantCulture);
|
||||||
@@ -68,7 +68,7 @@ namespace ASCOM.Meade.net.Wrapper
|
|||||||
|
|
||||||
public short GetValueShort(string driverId, string name, string subKey, string defaultValue)
|
public short GetValueShort(string driverId, string name, string subKey, string defaultValue)
|
||||||
{
|
{
|
||||||
var value = _profile.GetValue(driverId, name, subKey, defaultValue);
|
var value = GetValue(driverId, name, subKey, defaultValue);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return short.Parse(value, CultureInfo.InvariantCulture);
|
return short.Parse(value, CultureInfo.InvariantCulture);
|
||||||
@@ -81,7 +81,7 @@ namespace ASCOM.Meade.net.Wrapper
|
|||||||
|
|
||||||
public bool GetValueBool(string driverId, string name, string subKey, string defaultValue)
|
public bool GetValueBool(string driverId, string name, string subKey, string defaultValue)
|
||||||
{
|
{
|
||||||
var value = _profile.GetValue(driverId, name, subKey, defaultValue);
|
var value = GetValue(driverId, name, subKey, defaultValue);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return bool.Parse(value);
|
return bool.Parse(value);
|
||||||
@@ -94,7 +94,7 @@ namespace ASCOM.Meade.net.Wrapper
|
|||||||
|
|
||||||
public double GetValueDouble(string driverId, string name, string subKey, string defaultValue)
|
public double GetValueDouble(string driverId, string name, string subKey, string defaultValue)
|
||||||
{
|
{
|
||||||
var value = _profile.GetValue(driverId, name, subKey, defaultValue);
|
var value = GetValue(driverId, name, subKey, defaultValue);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return double.Parse(value, CultureInfo.InvariantCulture);
|
return double.Parse(value, CultureInfo.InvariantCulture);
|
||||||
|
|||||||
Reference in New Issue
Block a user