SyndicationFeed.Authors Propriedade
Definição
Obtém uma coleção de autores do feed.Gets a collection of authors of the feed.
public:
property System::Collections::ObjectModel::Collection<System::ServiceModel::Syndication::SyndicationPerson ^> ^ Authors { System::Collections::ObjectModel::Collection<System::ServiceModel::Syndication::SyndicationPerson ^> ^ get(); };
public System.Collections.ObjectModel.Collection<System.ServiceModel.Syndication.SyndicationPerson> Authors { get; }
member this.Authors : System.Collections.ObjectModel.Collection<System.ServiceModel.Syndication.SyndicationPerson>
Public ReadOnly Property Authors As Collection(Of SyndicationPerson)
Valor da propriedade
Uma coleção de SyndicationPerson objetos que representa os autores do feed.A collection of SyndicationPerson objects that represents the authors of the feed.
Exemplos
O código a seguir mostra como adicionar um autor à Authors coleção de um SyndicationFeed .The following code shows how to add an author to the Authors collection of a SyndicationFeed.
SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now);
feed.Authors.Add(new SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http://contoso/jesper"));
Dim feed As New SyndicationFeed("Feed Title", "Feed Description", New Uri("http:'Feed/Alternate/Link"), "FeedID", DateTime.Now)
feed.Authors.Add(New SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http:'contoso/jesper"))
O XML a seguir mostra como a Authors coleção é serializada para Atom 1,0.The following XML shows how the Authors collection is serialized to Atom 1.0.
<author>
<name>Jesper Aaberg</name>
<uri>http://contoso/Aaberg</uri>
<email>Jesper.Asberg@contoso.com</email>
</author>
O XML a seguir mostra como a Authors coleção é serializada para RSS 2,0.The following XML shows how the Authors collection is serialized to RSS 2.0.
<a10:author>
<a10:name>Lene Aalling</a10:name>
<a10:uri>http://contoso/Aalling</a10:uri>
<a10:email>Lene.Aalling@contoso.com</a10:email>
</a10:author>
Comentários
Quando serializado para Atom 1,0, cada SyndicationPerson uma na coleção é gravada em um <author> elemento.When serialized to Atom 1.0, each SyndicationPerson in the collection is written to an <author> element. Quando serializado para RSS 2,0, se apenas um único SyndicationPerson existir na coleção, ele será gravado em um <managingEditor> elemento.When serialized to RSS 2.0, if only a single SyndicationPerson exists in the collection, it is written to a <managingEditor> element. Caso contrário, cada SyndicationPerson uma é gravada em um <a10:author> elemento.Otherwise, each SyndicationPerson is written to an <a10:author> element.