Exemplo n.º 1
0
 public override void ReadFrom(XmlReader reader)
 {
     if (!CanRead(reader))
     {
         throw new InvalidOperationException("Trying to deserialize an item from unknown type");
     }
     this.item = (JsonSyndicationItem)this.serializer.ReadObject(reader);
     base.SetItem(this.item.ToSyndicationItem());
 }
Exemplo n.º 2
0
 public override void ReadFrom(XmlReader reader)
 {
     if (!CanRead(reader))
     {
         throw new InvalidOperationException("Trying to deserialize an item from unknown type");
     }
     this.item = (JsonSyndicationItem) this.serializer.ReadObject(reader);
     base.SetItem(this.item.ToSyndicationItem());
 }
Exemplo n.º 3
0
 protected override void SetItem(SyndicationItem item)
 {
     base.SetItem(item);
     this.item = new JsonSyndicationItem(item);
 }
Exemplo n.º 4
0
 public JsonItemFormatter(SyndicationItem itemToWrite)
     : base(itemToWrite)
 {
     this.serializer = new DataContractSerializer(typeof(JsonSyndicationItem));
     this.item = new JsonSyndicationItem(itemToWrite);
 }
Exemplo n.º 5
0
 public JsonItemFormatter()
     : base()
 {
     this.serializer = new DataContractSerializer(typeof(JsonSyndicationItem));
     this.item = null;
 }
Exemplo n.º 6
0
 protected override void SetItem(SyndicationItem item)
 {
     base.SetItem(item);
     this.item = new JsonSyndicationItem(item);
 }
Exemplo n.º 7
0
 public JsonItemFormatter(SyndicationItem itemToWrite)
     : base(itemToWrite)
 {
     this.serializer = new DataContractSerializer(typeof(JsonSyndicationItem));
     this.item       = new JsonSyndicationItem(itemToWrite);
 }
Exemplo n.º 8
0
 public JsonItemFormatter()
     : base()
 {
     this.serializer = new DataContractSerializer(typeof(JsonSyndicationItem));
     this.item       = null;
 }