SyndicationFeed.Authors Propiedad

Definición

Obtiene una colección de autores de la fuente.

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 de propiedad

Collection<SyndicationPerson>

Una colección de objetos SyndicationPerson que representa a los autores de la fuente.

Ejemplos

El código siguiente muestra cómo agregar un autor a la colección Authors de 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"))

El siguiente XML muestra cómo se serializa la colección Authors a Atom 1.0.

<author>
  <name>Jesper Aaberg</name>
  <uri>http://contoso/Aaberg</uri>
  <email>Jesper.Asberg@contoso.com</email>
</author>

El siguiente XML muestra cómo se serializa la colección Authors a 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>

Comentarios

Cuando se serializa en Atom 1.0, cada SyndicationPerson uno de la colección se escribe en un <author> elemento . Cuando se serializa en RSS 2.0, si solo existe un único SyndicationPerson en la colección, se escribe en un <managingEditor> elemento . De lo contrario, cada uno SyndicationPerson se escribe en un <a10:author> elemento .

Se aplica a