public override CommandResult Execute()
 {
     return(new AddCommandResult(Store, this,
                                 new List <Contact> {
         Store.Add(CommandArgParser.ContactFromArgs(Args))
     }));
 }
        public override CommandResult Execute()
        {
            ContactFieldFilter filter = CommandArgParser.FilterFromArgs(Args);

            if (filter.HasFilter)
            {
                Contact removed;
                if (Store.Remove(filter, out removed))
                {
                    return(new RemoveCommandResult(Store, this, new List <Contact>(1)
                    {
                        removed
                    }));
                }
            }
            else
            {
                Log.Warning("Remove requires at least one filter - skipping");
            }

            return(new NonUndoCommandResult(this, Store.Search(CommandArgParser.FilterFromArgs(Args))));
        }
 public override CommandResult Execute()
 {
     return(new NonUndoCommandResult(this, Store.Search(CommandArgParser.FilterFromArgs(Args))));
 }