Source
Contents
[
Hide
]Source class
Represents an individual source, such as a book, journal article, or interview.
public sealed class Source
Constructors
| Name | Description |
|---|---|
| Source(string, SourceType) | Initialize a new instance of the Source class. |
Properties
| Name | Description |
|---|---|
| AbbreviatedCaseNumber { get; set; } | Gets or sets the abbreviated case number of a source. |
| AlbumTitle { get; set; } | Gets or sets the album title of a source. |
| BookTitle { get; set; } | Gets or sets the book title of a source. |
| Broadcaster { get; set; } | Gets or sets the broadcaster of a source. |
| BroadcastTitle { get; set; } | Gets or sets the broadcast title of a source. |
| CaseNumber { get; set; } | Gets or sets the case number of a source. |
| ChapterNumber { get; set; } | Gets or sets the chapter number of a source. |
| City { get; set; } | Gets or sets the city of a source. |
| Comments { get; set; } | Gets or sets the comments of a source. |
| ConferenceName { get; set; } | Gets or sets the conference or proceedings name of a source. |
| Contributors { get; } | Gets contributors list (author, editor, writer etc) of a source. |
| CountryOrRegion { get; set; } | Gets or sets the country or region of a source. |
| Court { get; set; } | Gets or sets the court of a source. |
| Day { get; set; } | Gets or sets the day of a source. |
| DayAccessed { get; set; } | Gets or sets the day accessed of a source. |
| Department { get; set; } | Gets or sets the department of a source. |
| Distributor { get; set; } | Gets or sets the distributor of a source. |
| Doi { get; set; } | Gets or sets the digital object identifier. |
| Edition { get; set; } | Gets or sets the editor of a source. |
| Guid { get; set; } | Gets or sets the guid of a source. |
| Institution { get; set; } | Gets or sets the institution of a source. |
| InternetSiteTitle { get; set; } | Gets or sets the internet site title of a source. |
| Issue { get; set; } | Gets or sets the issue of a source. |
| JournalName { get; set; } | Gets or sets the journal name of a source. |
| Lcid { get; set; } | Gets or sets the locale ID of a source. |
| Medium { get; set; } | Gets or sets the medium of a source. |
| Month { get; set; } | Gets or sets the month of a source. |
| MonthAccessed { get; set; } | Gets or sets the month accessed of a source. |
| NumberVolumes { get; set; } | Gets or sets the number of volumes of a source. |
| Pages { get; set; } | Gets or sets the pages of a source. |
| PatentNumber { get; set; } | Gets or sets the patent number of a source. |
| PeriodicalTitle { get; set; } | Gets or sets the periodical title of a source. |
| ProductionCompany { get; set; } | Gets or sets the production company of a source. |
| PublicationTitle { get; set; } | Gets or sets the publication title of a source. |
| Publisher { get; set; } | Gets or sets the publisher of a source. |
| RecordingNumber { get; set; } | Gets or sets the recording number of a source. |
| RefOrder { get; set; } | Gets or sets the reference order of a source. |
| Reporter { get; set; } | Gets or sets the reporter of a source. |
| ShortTitle { get; set; } | Gets or sets the short title of a source. |
| SourceType { get; set; } | Gets or sets the source type of a source. |
| StandardNumber { get; set; } | Gets or sets the standard number of a source. |
| StateOrProvince { get; set; } | Gets or sets the state or province of a source. |
| Station { get; set; } | Gets or sets the station of a source. |
| Tag { get; set; } | Gets or sets the identifying tag name of a source. |
| Theater { get; set; } | Gets or sets the theater of a source. |
| ThesisType { get; set; } | Gets or sets the thesis type of a source. |
| Title { get; set; } | Gets or sets the title of a source. |
| Type { get; set; } | Gets or sets the type of a source. |
| Url { get; set; } | Gets or sets the url of a source. |
| Version { get; set; } | Gets or sets the version of a source. |
| Volume { get; set; } | Gets or sets the volume of a source. |
| Year { get; set; } | Gets or sets the year of a source. |
| YearAccessed { get; set; } | Gets or sets the year accessed 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.That(bibliography.Sources.Count, Is.EqualTo(12));
// Get default data from bibliography sources.
Source source = bibliography.Sources.FirstOrDefault();
Assert.That(source.Title, Is.EqualTo("Book 0 (No LCID)"));
Assert.That(source.SourceType, Is.EqualTo(SourceType.Book));
Assert.That(source.Contributors.Count(), Is.EqualTo(3));
Assert.That(source.AbbreviatedCaseNumber, Is.Null);
Assert.That(source.AlbumTitle, Is.Null);
Assert.That(source.BookTitle, Is.Null);
Assert.That(source.Broadcaster, Is.Null);
Assert.That(source.BroadcastTitle, Is.Null);
Assert.That(source.CaseNumber, Is.Null);
Assert.That(source.ChapterNumber, Is.Null);
Assert.That(source.Comments, Is.Null);
Assert.That(source.ConferenceName, Is.Null);
Assert.That(source.CountryOrRegion, Is.Null);
Assert.That(source.Court, Is.Null);
Assert.That(source.Day, Is.Null);
Assert.That(source.DayAccessed, Is.Null);
Assert.That(source.Department, Is.Null);
Assert.That(source.Distributor, Is.Null);
Assert.That(source.Doi, Is.Null);
Assert.That(source.Edition, Is.Null);
Assert.That(source.Guid, Is.Null);
Assert.That(source.Institution, Is.Null);
Assert.That(source.InternetSiteTitle, Is.Null);
Assert.That(source.Issue, Is.Null);
Assert.That(source.JournalName, Is.Null);
Assert.That(source.Lcid, Is.Null);
Assert.That(source.Medium, Is.Null);
Assert.That(source.Month, Is.Null);
Assert.That(source.MonthAccessed, Is.Null);
Assert.That(source.NumberVolumes, Is.Null);
Assert.That(source.Pages, Is.Null);
Assert.That(source.PatentNumber, Is.Null);
Assert.That(source.PeriodicalTitle, Is.Null);
Assert.That(source.ProductionCompany, Is.Null);
Assert.That(source.PublicationTitle, Is.Null);
Assert.That(source.Publisher, Is.Null);
Assert.That(source.RecordingNumber, Is.Null);
Assert.That(source.RefOrder, Is.Null);
Assert.That(source.Reporter, Is.Null);
Assert.That(source.ShortTitle, Is.Null);
Assert.That(source.StandardNumber, Is.Null);
Assert.That(source.StateOrProvince, Is.Null);
Assert.That(source.Station, Is.Null);
Assert.That(source.Tag, Is.EqualTo("BookNoLCID"));
Assert.That(source.Theater, Is.Null);
Assert.That(source.ThesisType, Is.Null);
Assert.That(source.Type, Is.Null);
Assert.That(source.Url, Is.Null);
Assert.That(source.Version, Is.Null);
Assert.That(source.Volume, Is.Null);
Assert.That(source.Year, Is.Null);
Assert.That(source.YearAccessed, Is.Null);
// Also, you can create a new source.
Source newSource = new Source("New source", SourceType.Misc);
ContributorCollection contributors = source.Contributors;
Assert.That(contributors.Artist, Is.Null);
Assert.That(contributors.BookAuthor, Is.Null);
Assert.That(contributors.Compiler, Is.Null);
Assert.That(contributors.Composer, Is.Null);
Assert.That(contributors.Conductor, Is.Null);
Assert.That(contributors.Counsel, Is.Null);
Assert.That(contributors.Director, Is.Null);
Assert.That(contributors.Editor, Is.Not.Null);
Assert.That(contributors.Interviewee, Is.Null);
Assert.That(contributors.Interviewer, Is.Null);
Assert.That(contributors.Inventor, Is.Null);
Assert.That(contributors.Performer, Is.Null);
Assert.That(contributors.Producer, Is.Null);
Assert.That(contributors.Translator, Is.Not.Null);
Assert.That(contributors.Writer, Is.Null);
Contributor editor = contributors.Editor;
Assert.That(((PersonCollection)editor).Count(), Is.EqualTo(2));
PersonCollection authors = (PersonCollection)contributors.Author;
Assert.That(authors.Count(), Is.EqualTo(2));
Person person = authors[0];
Assert.That(person.First, Is.EqualTo("Roxanne"));
Assert.That(person.Middle, Is.EqualTo("Brielle"));
Assert.That(person.Last, Is.EqualTo("Tejeda"));
See Also
- namespace Aspose.Words.Bibliography
- assembly Aspose.Words