public string ExecuteCommand(IRemoteClient remoteClient, IEnumerable <string> parameters) { var module = new ModuleDecorator(remoteClient); module.AddModule(parameters.First()); return("done"); }
protected override void HandleInternal(CommandLine commandLine, IRemoteClient remoteClient) { var loadModuleArgument = commandLine.Arguments.FirstOrDefault(x => x.Name == "load"); var moduleName = commandLine.Arguments.FirstOrDefault(x => x.Name == "unknown"); if (moduleName == null) { WriteWarning("You should define the module name."); return; } var moduleDecorator = new ModuleDecorator(remoteClient); moduleDecorator.UploadModule(moduleName.Value); moduleDecorator.AddModule(moduleName.Value); if (loadModuleArgument != null) { moduleDecorator.LoadModule(moduleName.Value); } }