public void Execute(Selection selection, string[] args, AbstractTableWriter writer) { try { var arguments = args.ToList(); var l1 = arguments[0]; arguments.RemoveAt(0); var rFile = arguments[0]; arguments.RemoveAt(0); var colToken = arguments[0]; arguments.RemoveAt(0); var colFreq = arguments[0]; arguments.RemoveAt(0); var l2 = arguments[0]; arguments.RemoveAt(0); var vm = new KeywordPresetReferenceListViewModel { Selection = selection, LayerDisplayname = l1, CorrespondingLayerValueFilter = new CorrespondingLayerValueFilterViewModel { Layer1Displayname = l1, Layer2Displayname = l2, AnyMatch = true, Layer2ValueFilters = new HashSet <string>(arguments), Selection = selection } }; vm.LoadRefList(rFile, int.Parse(colToken), int.Parse(colFreq)); vm.Execute(); writer.WriteTable(vm.GetDataTable()); } catch { // ignore } }
public void Execute(Selection selection, string[] args, AbstractTableWriter writer) { try { if (args.Length != 4) { return; } var vm = new KeywordPresetReferenceListViewModel { Selection = selection, LayerDisplayname = args[0] }; vm.LoadRefList(args[1], int.Parse(args[2]), int.Parse(args[3])); vm.Execute(); writer.WriteTable(vm.GetDataTable()); } catch { // ignore } }