diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-10 12:59:22 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-10 12:59:22 +0200 |
| commit | 6240aad18f5dc54d4e29bf2d39f49ef1ba39742f (patch) | |
| tree | 8899a6345ec0f2ac105d10536a8b33ecacdaf2da /Software/Visual_Studio/Utilities/Tango.Stubs.CLI | |
| parent | ee0f4151c329542c30041ff1da91d25e8d8e2575 (diff) | |
| download | Tango-6240aad18f5dc54d4e29bf2d39f49ef1ba39742f.tar.gz Tango-6240aad18f5dc54d4e29bf2d39f49ef1ba39742f.zip | |
Added array support for stubsexec.
Improved PPC update & setup.
Diffstat (limited to 'Software/Visual_Studio/Utilities/Tango.Stubs.CLI')
| -rw-r--r-- | Software/Visual_Studio/Utilities/Tango.Stubs.CLI/Program.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.CLI/Program.cs b/Software/Visual_Studio/Utilities/Tango.Stubs.CLI/Program.cs index 62e4498f7..e7c0f5d52 100644 --- a/Software/Visual_Studio/Utilities/Tango.Stubs.CLI/Program.cs +++ b/Software/Visual_Studio/Utilities/Tango.Stubs.CLI/Program.cs @@ -13,6 +13,8 @@ using Tango.Transport.Adapters; using Google.Protobuf; using System.Threading; using Newtonsoft.Json; +using Google.Protobuf.Collections; +using System.Collections; namespace Tango.Stubs.CLI { @@ -68,6 +70,15 @@ namespace Tango.Stubs.CLI { prop.SetValue(request, bool.Parse(arg)); } + else if (typeof(IList).IsAssignableFrom(prop.PropertyType)) + { + IList arr = prop.GetValue(request) as IList; + foreach (var item in arg.Split(',')) + { + object converted = Convert.ChangeType(item, prop.PropertyType.GetGenericArguments()[0]); + arr.Add(converted); + } + } else { object converted = Convert.ChangeType(arg, prop.PropertyType); |
