public void RunCommand(iCommand newCommand, CommandSettings commandSet) { try { newCommand.Execute(commandSet); } catch (Exception ex) { throw new Exception("RunCommand error: " + ex.Message); } }
public void AutoRun() { try { if (_engineSettings.Commands != null) { Assembly assem = System.Reflection.Assembly.GetExecutingAssembly(); foreach (CommandSettings commandSet in _engineSettings.Commands) { Type type = assem.GetType("DHI.Generic.NetCDF.MIKE.Commands." + commandSet.CommandName); iCommand autoRunCommand = (iCommand)assem.CreateInstance(type.Namespace + "." + type.Name); autoRunCommand.Execute(commandSet); } } } catch (Exception ex) { throw new Exception("AutoRun error: " + ex.Message); } }
public void ExecuteCommand() { command.Execute(); }