public void Execute(Selection selection, string[] args, AbstractTableWriter writer) { var arguments = args.ToList(); var l1 = arguments[0]; arguments.RemoveAt(0); var meta = arguments[0]; arguments.RemoveAt(0); var l2 = arguments[0]; arguments.RemoveAt(0); var any = bool.Parse(arguments[0]); arguments.RemoveAt(0); var vm = new DispersionViewModel { Selection = selection, CorrespondingLayerValueFilter = new CorrespondingLayerValueFilterViewModel { Layer1Displayname = l1, Layer2Displayname = l2, AnyMatch = any, Layer2ValueFilters = new HashSet <string>(arguments), Selection = selection }, LayerDisplayname = l1, MetadataKey = meta }; vm.Execute(); writer.WriteTable(selection.Displayname, vm.GetDataTable()); }
public void Execute(Selection selection, string[] args, AbstractTableWriter writer) { var vm = new DispersionViewModel { Selection = selection }; if (args.Length > 0) { vm.LayerDisplayname = args[0]; } if (args.Length > 1) { vm.LayerDisplayname = args[1]; } vm.Execute(); writer.WriteTable(selection.Displayname, vm.GetDataTable()); }