Condividi tramite


SyndicationFeed.Load Metodo

Definizione

Overload

Load(XmlReader)

Carica un feed di diffusione dal lettore XML specificato.

Load<TSyndicationFeed>(XmlReader)

Carica un'istanza derivata da SyndicationFeed a partire dalla classe XmlReader specificata.

Load(XmlReader)

Origine:
SyndicationFeed.cs
Origine:
SyndicationFeed.cs
Origine:
SyndicationFeed.cs
Origine:
SyndicationFeed.cs

Carica un feed di diffusione dal lettore XML specificato.

public:
 static System::ServiceModel::Syndication::SyndicationFeed ^ Load(System::Xml::XmlReader ^ reader);
public static System.ServiceModel.Syndication.SyndicationFeed Load (System.Xml.XmlReader reader);
static member Load : System.Xml.XmlReader -> System.ServiceModel.Syndication.SyndicationFeed
Public Shared Function Load (reader As XmlReader) As SyndicationFeed

Parametri

reader
XmlReader

Classe XmlReader da cui caricare il feed.

Restituisce

Classe SyndicationFeed che contiene i contenuti caricati.

Esempio

Nel seguente esempio viene illustrato come chiamare questo metodo.

XmlReader reader = XmlReader.Create("http://localhost/feeds/serializedFeed.xml");
SyndicationFeed feed = SyndicationFeed.Load(reader);
Dim reader As XmlReader = XmlReader.Create("http:'localhost/feeds/serializedFeed.xml")
Dim feed As SyndicationFeed = SyndicationFeed.Load(reader)

Si applica a

Load<TSyndicationFeed>(XmlReader)

Origine:
SyndicationFeed.cs
Origine:
SyndicationFeed.cs
Origine:
SyndicationFeed.cs
Origine:
SyndicationFeed.cs

Carica un'istanza derivata da SyndicationFeed a partire dalla classe XmlReader specificata.

public:
generic <typename TSyndicationFeed>
 where TSyndicationFeed : System::ServiceModel::Syndication::SyndicationFeedgcnew() static TSyndicationFeed Load(System::Xml::XmlReader ^ reader);
public static TSyndicationFeed Load<TSyndicationFeed> (System.Xml.XmlReader reader) where TSyndicationFeed : System.ServiceModel.Syndication.SyndicationFeed, new();
static member Load : System.Xml.XmlReader -> 'SyndicationFeed (requires 'SyndicationFeed :> System.ServiceModel.Syndication.SyndicationFeed and 'SyndicationFeed : (new : unit -> 'SyndicationFeed))
Public Shared Function Load(Of TSyndicationFeed As {SyndicationFeedNew}) (reader As XmlReader) As TSyndicationFeed

Parametri di tipo

TSyndicationFeed

Il tipo del feed di diffusione.

Parametri

reader
XmlReader

XmlReader da cui leggere.

Restituisce

TSyndicationFeed

Istanza derivata da SyndicationFeed che contiene il feed.

Eccezioni

Rilevato XML non valido durante la lettura.

Esempio

Nel codice seguente viene illustrato come caricare un feed di diffusione da un'istanza di XmlReader.

XmlReader reader = XmlReader.Create("http://localhost/feeds/serializedFeed.xml");
SyndicationFeed feed = SyndicationFeed.Load(reader);
Dim reader As XmlReader = XmlReader.Create("http:'localhost/feeds/serializedFeed.xml")
Dim feed As SyndicationFeed = SyndicationFeed.Load(reader)

Commenti

Utilizzare il metodo durante il caricamento di un elemento di diffusione in una classe derivata da SyndicationFeed.

Si applica a