Update to EF6

This commit is contained in:
2014-07-14 17:38:14 -04:00
parent 7e3eedd844
commit 2f90035494
39 changed files with 2022 additions and 1944 deletions

View File

@@ -1,7 +1,6 @@
using System.Xml;
using Common.Debug;
using Common.Debug;
using Common.Xml;
using System.Xml;
namespace FeedCenter.FeedParsers
{
@@ -14,13 +13,13 @@ namespace FeedCenter.FeedParsers
try
{
// Create the XML document
XmlDocument document = new XmlDocument { XmlResolver = null };
var document = new XmlDocument { XmlResolver = null };
// Load the XML document from the text
document.LoadXml(feedText);
// Create the namespace manager
XmlNamespaceManager namespaceManager = document.GetAllNamespaces();
var namespaceManager = document.GetAllNamespaces();
// Get the root node
XmlNode rootNode = document.DocumentElement;
@@ -30,7 +29,7 @@ namespace FeedCenter.FeedParsers
return FeedReadResult.UnknownError;
// Initialize the sequence number for items
int sequence = 0;
var sequence = 0;
// Loop over all nodes in the root node
foreach (XmlNode node in rootNode.ChildNodes)
@@ -81,7 +80,7 @@ namespace FeedCenter.FeedParsers
protected override FeedItem ParseFeedItem(XmlNamespaceManager namespaceManager, XmlNode node)
{
// Create a new feed item
FeedItem feedItem = new FeedItem();
var feedItem = FeedItem.Create();
// Loop over all nodes in the feed node
foreach (XmlNode childNode in node.ChildNodes)
@@ -114,7 +113,7 @@ namespace FeedCenter.FeedParsers
if (string.IsNullOrEmpty(rel) || rel == "alternate")
{
string link = childNode.Attributes["href"].InnerText;
var link = childNode.Attributes["href"].InnerText;
if (link.StartsWith("/"))
{

View File

@@ -1,16 +1,16 @@
using System;
using Common.Debug;
using System;
using System.Linq;
using System.Xml;
using Common.Debug;
namespace FeedCenter.FeedParsers
{
[Serializable]
internal class InvalidFeedFormatException : ApplicationException
{
internal InvalidFeedFormatException(Exception exception) : base(string.Empty, exception)
{
internal InvalidFeedFormatException(Exception exception)
: base(string.Empty, exception)
{
}
}
@@ -124,7 +124,7 @@ namespace FeedCenter.FeedParsers
try
{
// Create the XML document
XmlDocument document = new XmlDocument { XmlResolver = null };
var document = new XmlDocument { XmlResolver = null };
// Load the XML document from the text
document.LoadXml(feedText);

View File

@@ -1,7 +1,6 @@
using System.Xml;
using Common.Debug;
using Common.Debug;
using Common.Xml;
using System.Xml;
namespace FeedCenter.FeedParsers
{
@@ -14,13 +13,13 @@ namespace FeedCenter.FeedParsers
try
{
// Create the XML document
XmlDocument document = new XmlDocument { XmlResolver = null };
var document = new XmlDocument { XmlResolver = null };
// Load the XML document from the text
document.LoadXml(feedText);
// Create the namespace manager
XmlNamespaceManager namespaceManager = document.GetAllNamespaces();
XmlNamespaceManager namespaceManager = document.GetAllNamespaces();
// Get the root node
XmlNode rootNode = document.DocumentElement;
@@ -28,7 +27,7 @@ namespace FeedCenter.FeedParsers
// If we didn't find a root node then bail
if (rootNode == null)
return FeedReadResult.UnknownError;
// Get the channel node
XmlNode channelNode = rootNode.SelectSingleNode("default:channel", namespaceManager);
@@ -83,7 +82,7 @@ namespace FeedCenter.FeedParsers
protected override FeedItem ParseFeedItem(XmlNamespaceManager namespaceManager, XmlNode node)
{
// Create a new feed item
FeedItem feedItem = new FeedItem();
FeedItem feedItem = FeedItem.Create();
// Loop over all nodes in the feed node
foreach (XmlNode childNode in node.ChildNodes)
@@ -97,10 +96,10 @@ namespace FeedCenter.FeedParsers
case "link":
feedItem.Link = childNode.InnerText.Trim();
// RDF doesn't have a GUID node so we'll just use the link
feedItem.Guid = feedItem.Link;
break;
case "description":

View File

@@ -1,7 +1,6 @@
using System.Xml;
using Common.Debug;
using Common.Debug;
using Common.Xml;
using System.Xml;
namespace FeedCenter.FeedParsers
{
@@ -14,7 +13,7 @@ namespace FeedCenter.FeedParsers
try
{
// Create the XML document
XmlDocument document = new XmlDocument { XmlResolver = null };
var document = new XmlDocument { XmlResolver = null };
// Load the XML document from the text
document.LoadXml(feedText);
@@ -75,7 +74,7 @@ namespace FeedCenter.FeedParsers
protected override FeedItem ParseFeedItem(XmlNamespaceManager namespaceManager, XmlNode node)
{
// Create a new feed item
FeedItem feedItem = new FeedItem();
FeedItem feedItem = FeedItem.Create();
// Loop over all nodes in the feed node
foreach (XmlNode childNode in node.ChildNodes)