Example #1
0
        private void RemoveFeed(string urlOrId)
        {
            Command <GeekStreamModel> command;
            int feedId;

            if (Int32.TryParse(urlOrId, out feedId))
            {
                command = new RemoveFeedByIdCommand(feedId);
            }
            else
            {
                command = new RemoveFeedByUrlCommand(urlOrId);
            }

            try
            {
                _geekStreamDb.Execute(command);
                Console.WriteLine("ok");
            }
            catch (CommandAbortedException)
            {
                Console.WriteLine("no such feed");
            }
        }
Example #2
0
        private void RemoveFeed(string urlOrId)
        {
            Command<GeekStreamModel> command;
            int feedId;
            if (Int32.TryParse(urlOrId, out feedId))
            {
                command = new RemoveFeedByIdCommand(feedId);
            }
            else
            {
                command = new RemoveFeedByUrlCommand(urlOrId);
            }

            try
            {
                _geekStreamDb.Execute(command);
                Console.WriteLine("ok");
            }
            catch (CommandAbortedException)
            {
                Console.WriteLine("no such feed");
            }
        }