1 //
2 // Copyright (c) 2010-2018 Antmicro
3 // Copyright (c) 2011-2015 Realtime Embedded
4 //
5 // This file is licensed under the MIT License.
6 // Full license text is available in 'licenses/MIT.txt'.
7 //
8 using AntShell.Commands;
9 using Antmicro.Renode.UserInterface.Tokenizer;
10 using System.Linq;
11 
12 namespace Antmicro.Renode.UserInterface.Commands
13 {
14     public class StringCommand : AutoLoadCommand
15     {
16         /*[Runnable]
17         public void Run(ICommandInteraction writer, params Token[] tokens)
18         {
19             writer.WriteLine("\"" + string.Join("", tokens.Select(x=>x.GetObjectValue().ToString())) + "\"");
20         }*/
21 
22         [Runnable]
Run(ICommandInteraction writer, Token[] tokens)23         public void Run(ICommandInteraction writer, Token[] tokens)
24         {
25             writer.WriteLine("\"" + string.Join(" ", tokens.Select(x=>x.GetObjectValue().ToString())) + "\"");
26         }
27 
StringCommand(Monitor monitor)28         public StringCommand(Monitor monitor) : base(monitor, "string", "treat given arguments as a single string.", "str")
29         {
30         }
31     }
32 }
33 
34