SyndicationFeed.Contributors Propriedade
Definição
Obtém uma coleção dos colaboradores do feed.Gets a collection of the contributors to the feed.
public:
property System::Collections::ObjectModel::Collection<System::ServiceModel::Syndication::SyndicationPerson ^> ^ Contributors { System::Collections::ObjectModel::Collection<System::ServiceModel::Syndication::SyndicationPerson ^> ^ get(); };
public System.Collections.ObjectModel.Collection<System.ServiceModel.Syndication.SyndicationPerson> Contributors { get; }
member this.Contributors : System.Collections.ObjectModel.Collection<System.ServiceModel.Syndication.SyndicationPerson>
Public ReadOnly Property Contributors As Collection(Of SyndicationPerson)
Valor da propriedade
Uma coleção de SyndicationPerson objetos que representa os colaboradores para o feed.A collection of SyndicationPerson objects that represents the contributors to the feed.
Exemplos
O código a seguir mostra como adicionar um colaborador à Contributors coleção de um SyndicationFeed .The following code shows how to add a contributor to the Contributors collection of a SyndicationFeed.
SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now);
feed.Contributors.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.Contributors.Add(New SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http:'contoso/jesper"))
O XML a seguir mostra como a Contributors coleção é serializada para Atom 1,0.The following XML shows how the Contributors collection is serialized to Atom 1.0.
<contributor>
<name>Lene Aalling</name>
<uri>http://contoso/Aalling</uri>
<email>Lene.Aaling@contoso.com</email>
</contributor>
O XML a seguir mostra como a Contributors coleção é serializada para RSS 2,0.The following XML shows how the Contributors collection is serialized to RSS 2.0.
<a10:contributor>
<a10:name>Lene Aalling</a10:name>
<a10:uri>http://contoso/Aalling</a10:uri>
<a10:email>Lene.Aalling@contoso.com</a10:email>
</a10:contributor>
Comentários
Quando serializado para Atom 1,0, cada SyndicationPerson uma na coleção é gravada em um <contributor> elemento.When serialized to Atom 1.0, each SyndicationPerson in the collection is written to a <contributor> element.
Quando serializado para RSS 2,0, cada SyndicationPerson um na coleção é gravado em um <a10:contributor> elemento.When serialized to RSS 2.0, each SyndicationPerson in the collection is written to an <a10:contributor> element.