ContributorCollection
Contents
[
Hide
]ContributorCollection class
Represents bibliography source contributors.
public sealed class ContributorCollection : IEnumerable<Contributor>
Properties
Name | Description |
---|---|
Artist { get; } | Gets the artist of a source. |
Author { get; } | Gets the author of a source. |
BookAuthor { get; } | Gets the book author of a source. |
Compiler { get; } | Gets the compiler of a source. |
Composer { get; } | Gets the composer of a source. |
Conductor { get; } | Gets the conductor of a source. |
Counsel { get; } | Gets the counsel of a source. |
Director { get; } | Gets the director of a source. |
Editor { get; } | Gets the editor of a source. |
Interviewee { get; } | Gets the interviewee of a source. |
Interviewer { get; } | Gets the interviewer of a source. |
Inventor { get; } | Gets the inventor of a source. |
Performer { get; } | Gets the performer of a source. |
Producer { get; } | Gets the producer of a source. |
Translator { get; } | Gets the translator of a source. |
Writer { get; } | Gets the writer of a source. |
Examples
Shows how to get bibliography sources available in the document.
Document document = new Document(MyDir + "Bibliography sources.docx");
Bibliography bibliography = document.Bibliography;
Assert.AreEqual(12, bibliography.Sources.Count);
Source source = bibliography.Sources.FirstOrDefault();
Assert.AreEqual("Book 0 (No LCID)", source.Title);
ContributorCollection contributors = source.Contributors;
Assert.IsNull(contributors.Artist);
Assert.IsNull(contributors.BookAuthor);
Assert.IsNull(contributors.Compiler);
Assert.IsNull(contributors.Composer);
Assert.IsNull(contributors.Conductor);
Assert.IsNull(contributors.Counsel);
Assert.IsNull(contributors.Director);
Assert.IsNotNull(contributors.Editor);
Assert.IsNull(contributors.Interviewee);
Assert.IsNull(contributors.Interviewer);
Assert.IsNull(contributors.Inventor);
Assert.IsNull(contributors.Performer);
Assert.IsNull(contributors.Producer);
Assert.IsNotNull(contributors.Translator);
Assert.IsNull(contributors.Writer);
Contributor editor = contributors.Editor;
Assert.AreEqual(2, ((PersonCollection)editor).Count());
PersonCollection authors = (PersonCollection)contributors.Author;
Assert.AreEqual(2, authors.Count());
Person person = authors[0];
Assert.AreEqual("Roxanne", person.First);
Assert.AreEqual("Brielle", person.Middle);
Assert.AreEqual("Tejeda", person.Last);
See Also
- class Contributor
- namespace Aspose.Words.Bibliography
- assembly Aspose.Words