public FeedClient(IFeedSerializer feedSerializer, IConfiguration config) { _feedSerializer = feedSerializer; _config = config; }
public FeedHttpTransport(XmlNodeList configData) { this.connections = new Hashtable(); this.defaulPort = 80; this.outboundLimit = 16; this.receiveTimeout = 10000; if (configData != null) { foreach (XmlNode node in configData) { XmlElement element = node as XmlElement; if (element != null) { switch (element.LocalName) { case "connectionLimit": { int outLimit = Convert.ToInt32(element.Attributes["inbound"].Value); //int inLimit = Convert.ToInt32(element.Attributes["outbound"].Value); this.outboundLimit = outLimit; //this.inboundLimit = inLimit; continue; } case "defaultPort": { this.defaulPort = Convert.ToInt32(element.Attributes["value"].Value); continue; } case "serializer": { string serializerType = element.Attributes["type"].Value; this.serializer = FeedTransport.LoadSerializer(serializerType); continue; } case "hosts": { //this.ParseHosts(element); continue; } case "receiveTimeout": { this.receiveTimeout = Convert.ToInt32(element.Attributes["value"].Value); continue; } //case "sendTimeout": // { // this.sendTimeout = Convert.ToInt32(element.Attributes["value"].Value); // continue; // } } } } } if (this.serializer == null) { this.serializer = new FeedSerializer(); } }
/// <summary> /// Initializes a new instance of the FeedHttpConnection class. /// </summary> /// <param name="destination">The Uri object of the RSS feed.</param> /// <param name="serializer">The serializer object.</param> public FeedHttpConnection(Uri destination, IFeedSerializer serializer) { this.Destination = destination; this.serializer = serializer; ReceiveTimeout = 60000; }
public FeedHttpTransport() { this.connections = new Hashtable(); serializer = new FeedSerializer(); }