public override void ReadFrom(XmlReader reader) { if (!CanRead(reader)) { throw new InvalidOperationException("Trying to deserialize an feed from unknown type"); } this.feed = (JsonSyndicationFeed) this.serializer.ReadObject(reader); base.SetFeed(this.feed.ToSyndicationFeed()); }
public override void ReadFrom(XmlReader reader) { if (!CanRead(reader)) { throw new InvalidOperationException("Trying to deserialize an feed from unknown type"); } this.feed = (JsonSyndicationFeed)this.serializer.ReadObject(reader); base.SetFeed(this.feed.ToSyndicationFeed()); }
protected override void SetFeed(SyndicationFeed feed) { base.SetFeed(feed); this.feed = new JsonSyndicationFeed(feed); }
public JsonFeedFormatter(SyndicationFeed feedToWrite) : base(feedToWrite) { this.serializer = new DataContractSerializer(typeof(JsonSyndicationFeed)); this.feed = new JsonSyndicationFeed(feedToWrite); }
public JsonFeedFormatter() : base() { this.serializer = new DataContractSerializer(typeof(JsonSyndicationFeed)); this.feed = null; }