コード例 #1
0
        private static int HandleRemove(IJournalrService service, RemoveOptions opts)
        {
            var success = false;

            if (opts.Id != null)
            {
                success = service.RemoveEntry(opts.Id);
            }
            else
            {
                success = service.RemoveEntry(opts.Count);
            }

            if (success)
            {
                Console.WriteLine("Deleted");
            }
            else
            {
                Console.WriteLine("Delete failed");
            }

            return(0);
        }