Compartilhar via


SyndicationFeed.Load Método

Definição

Sobrecargas

Load(XmlReader)

Carrega um feed de sindicalização do leitor de XML especificado.

Load<TSyndicationFeed>(XmlReader)

Carrega uma instância derivada do SyndicationFeed do XmlReader especificado.

Load(XmlReader)

Carrega um feed de sindicalização do leitor de XML especificado.

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

Parâmetros

reader
XmlReader

O XmlReader do qual o feed deve ser carregado.

Retornos

SyndicationFeed

Um SyndicationFeed que contém o conteúdo carregado.

Exemplos

O exemplo a seguir demonstra como chamar esse método.

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)

Aplica-se a

Load<TSyndicationFeed>(XmlReader)

Carrega uma instância derivada do SyndicationFeed do XmlReader especificado.

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

Parâmetros de tipo

TSyndicationFeed

O tipo de feed de sindicalização.

Parâmetros

reader
XmlReader

O XmlReader para leitura.

Retornos

TSyndicationFeed

Uma instância derivada do SyndicationFeed que contém o feed.

Exceções

XML inválido encontrado durante a leitura.

Exemplos

O código a seguir mostra como carregar um feed de sindicalização de uma XmlReader instância.

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)

Comentários

Use esse método quando estiver carregando um item de sindicalização em uma classe derivada de SyndicationFeed.

Aplica-se a