mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-02-12 02:58:36 -05:00
More UI updates and cleanup
This commit is contained in:
@@ -5,34 +5,15 @@ using System.Xml;
|
||||
|
||||
namespace FeedCenter.FeedParsers;
|
||||
|
||||
[Serializable]
|
||||
internal class InvalidFeedFormatException : ApplicationException
|
||||
{
|
||||
internal InvalidFeedFormatException(Exception exception)
|
||||
: base(string.Empty, exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
internal abstract class FeedParserBase
|
||||
{
|
||||
#region Member variables
|
||||
|
||||
protected readonly Feed Feed;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
protected FeedParserBase(Feed feed)
|
||||
{
|
||||
Feed = feed;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public abstract FeedReadResult ParseFeed(string feedText);
|
||||
|
||||
protected abstract FeedItem ParseFeedItem(XmlNode node);
|
||||
@@ -57,9 +38,6 @@ internal abstract class FeedParserBase
|
||||
{
|
||||
Log.Logger.Information("New link: " + newFeedItem.Link);
|
||||
|
||||
// Associate the new item with the right feed
|
||||
newFeedItem.Feed = Feed;
|
||||
|
||||
// Set the item as new
|
||||
newFeedItem.New = true;
|
||||
|
||||
@@ -96,10 +74,6 @@ internal abstract class FeedParserBase
|
||||
sequence++;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Parser creation and detection
|
||||
|
||||
public static FeedParserBase CreateFeedParser(Feed feed, string feedText)
|
||||
{
|
||||
var feedType = DetectFeedType(feedText);
|
||||
@@ -155,6 +129,4 @@ internal abstract class FeedParserBase
|
||||
throw new FeedParseException(FeedParseError.InvalidXml);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user