aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.Stubs.CLI
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2017-12-28 14:46:18 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2017-12-28 14:46:18 +0200
commit2d3f4bfd4b265888933ad8a7e21e4dd80aa1eda2 (patch)
tree98a8357ac20586f59fb7baccb4bf2536c9ae6d3a /Software/Visual_Studio/Utilities/Tango.Stubs.CLI
parent8b4e9bff64d712c3dc35a05278fddbbf7814c2ad (diff)
downloadTango-2d3f4bfd4b265888933ad8a7e21e4dd80aa1eda2.tar.gz
Tango-2d3f4bfd4b265888933ad8a7e21e4dd80aa1eda2.zip
Fixed some issue in Stubs CLI
Diffstat (limited to 'Software/Visual_Studio/Utilities/Tango.Stubs.CLI')
-rw-r--r--Software/Visual_Studio/Utilities/Tango.Stubs.CLI/Program.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.CLI/Program.cs b/Software/Visual_Studio/Utilities/Tango.Stubs.CLI/Program.cs
index 01a9b3c66..dd1d9d3e0 100644
--- a/Software/Visual_Studio/Utilities/Tango.Stubs.CLI/Program.cs
+++ b/Software/Visual_Studio/Utilities/Tango.Stubs.CLI/Program.cs
@@ -59,19 +59,18 @@ namespace Tango.Stubs.CLI
{
String arg = args[argIndex++].ToString();
- double numD;
- int numI;
- if (int.TryParse(arg, out numI))
+ if (prop.PropertyType == typeof(UInt32))
{
- prop.SetValue(request, numI);
+ prop.SetValue(request, UInt32.Parse(arg));
}
- else if (double.TryParse(arg, out numD))
+ else if (prop.PropertyType == typeof(bool))
{
- prop.SetValue(request, numD);
+ prop.SetValue(request, bool.Parse(arg));
}
else
{
- prop.SetValue(request, arg);
+ object converted = Convert.ChangeType(arg, prop.PropertyType);
+ prop.SetValue(request, converted);
}
}