Source

Source class

Rappresenta una fonte individuale, come un libro, un articolo di giornale o un’intervista.

public sealed class Source

Costruttori

NomeDescrizione
Source(string, SourceType)Inizializza una nuova istanza diSource classe.

Proprietà

NomeDescrizione
AbbreviatedCaseNumber { get; set; }Ottiene o imposta il numero di caso abbreviato di una fonte.
AlbumTitle { get; set; }Ottiene o imposta il titolo dell’album di una sorgente.
BookTitle { get; set; }Ottiene o imposta il titolo del libro di una fonte.
Broadcaster { get; set; }Ottiene o imposta l’emittente di una sorgente.
BroadcastTitle { get; set; }Ottiene o imposta il titolo di trasmissione di una sorgente.
CaseNumber { get; set; }Ottiene o imposta il numero del caso di una sorgente.
ChapterNumber { get; set; }Ottiene o imposta il numero del capitolo di una fonte.
City { get; set; }Ottiene o imposta la città di una sorgente.
Comments { get; set; }Ottiene o imposta i commenti di una sorgente.
ConferenceName { get; set; }Ottiene o imposta il nome della conferenza o degli atti di una fonte.
Contributors { get; }Ottiene l’elenco dei collaboratori (autore, editore, scrittore ecc.) di una fonte.
CountryOrRegion { get; set; }Ottiene o imposta il paese o la regione di una sorgente.
Court { get; set; }Ottiene o imposta il campo di una sorgente.
Day { get; set; }Ottiene o imposta il giorno di una sorgente.
DayAccessed { get; set; }Ottiene o imposta il giorno di accesso a una sorgente.
Department { get; set; }Ottiene o imposta il dipartimento di una fonte.
Distributor { get; set; }Ottiene o imposta il distributore di una sorgente.
Doi { get; set; }Ottiene o imposta l’identificatore dell’oggetto digitale.
Edition { get; set; }Ottiene o imposta l’editor di una sorgente.
Guid { get; set; }Ottiene o imposta il GUID di una sorgente.
Institution { get; set; }Ottiene o imposta l’istituzione di una fonte.
InternetSiteTitle { get; set; }Ottiene o imposta il titolo del sito Internet di una fonte.
Issue { get; set; }Ottiene o imposta il problema di una fonte.
JournalName { get; set; }Ottiene o imposta il nome del giornale di una fonte.
Lcid { get; set; }Ottiene o imposta l’ID locale di una sorgente.
Medium { get; set; }Ottiene o imposta il mezzo di una sorgente.
Month { get; set; }Ottiene o imposta il mese di una sorgente.
MonthAccessed { get; set; }Ottiene o imposta il mese di accesso di una sorgente.
NumberVolumes { get; set; }Ottiene o imposta il numero di volumi di una sorgente.
Pages { get; set; }Ottiene o imposta le pagine di una sorgente.
PatentNumber { get; set; }Ottiene o imposta il numero di brevetto di una fonte.
PeriodicalTitle { get; set; }Ottiene o imposta il titolo del periodico di una fonte.
ProductionCompany { get; set; }Ottiene o imposta la società di produzione di una fonte.
PublicationTitle { get; set; }Ottiene o imposta il titolo della pubblicazione di una fonte.
Publisher { get; set; }Ottiene o imposta l’editore di una fonte.
RecordingNumber { get; set; }Ottiene o imposta il numero di registrazione di una sorgente.
RefOrder { get; set; }Ottiene o imposta l’ordine di riferimento di una sorgente.
Reporter { get; set; }Ottiene o imposta il reporter di una sorgente.
ShortTitle { get; set; }Ottiene o imposta il titolo breve di una sorgente.
SourceType { get; set; }Ottiene o imposta il tipo di sorgente di una sorgente.
StandardNumber { get; set; }Ottiene o imposta il numero standard di una sorgente.
StateOrProvince { get; set; }Ottiene o imposta lo stato o la provincia di una sorgente.
Station { get; set; }Ottiene o imposta la stazione di una sorgente.
Tag { get; set; }Ottiene o imposta il nome del tag identificativo di una sorgente.
Theater { get; set; }Ottiene o imposta il teatro di una sorgente.
ThesisType { get; set; }Ottiene o imposta il tipo di tesi di una fonte.
Title { get; set; }Ottiene o imposta il titolo di una sorgente.
Type { get; set; }Ottiene o imposta il tipo di una sorgente.
Url { get; set; }Ottiene o imposta l’URL di una sorgente.
Version { get; set; }Ottiene o imposta la versione di una sorgente.
Volume { get; set; }Ottiene o imposta il volume di una sorgente.
Year { get; set; }Ottiene o imposta l’anno di una sorgente.
YearAccessed { get; set; }Ottiene o imposta l’anno di accesso a una sorgente.

Esempi

Mostra come ottenere le fonti bibliografiche disponibili nel documento.

Document document = new Document(MyDir + "Bibliography sources.docx");

Bibliography bibliography = document.Bibliography;
Assert.AreEqual(12, bibliography.Sources.Count);

// Ottieni i dati predefiniti dalle fonti bibliografiche.
Source source = bibliography.Sources.FirstOrDefault();
Assert.AreEqual("Book 0 (No LCID)", source.Title);
Assert.AreEqual(SourceType.Book, source.SourceType);
Assert.AreEqual(3, source.Contributors.Count());
Assert.IsNull(source.AbbreviatedCaseNumber);
Assert.IsNull(source.AlbumTitle);
Assert.IsNull(source.BookTitle);
Assert.IsNull(source.Broadcaster);
Assert.IsNull(source.BroadcastTitle);
Assert.IsNull(source.CaseNumber);
Assert.IsNull(source.ChapterNumber);
Assert.IsNull(source.Comments);
Assert.IsNull(source.ConferenceName);
Assert.IsNull(source.CountryOrRegion);
Assert.IsNull(source.Court);
Assert.IsNull(source.Day);
Assert.IsNull(source.DayAccessed);
Assert.IsNull(source.Department);
Assert.IsNull(source.Distributor);
Assert.IsNull(source.Doi);
Assert.IsNull(source.Edition);
Assert.IsNull(source.Guid);
Assert.IsNull(source.Institution);
Assert.IsNull(source.InternetSiteTitle);
Assert.IsNull(source.Issue);
Assert.IsNull(source.JournalName);
Assert.IsNull(source.Lcid);
Assert.IsNull(source.Medium);
Assert.IsNull(source.Month);
Assert.IsNull(source.MonthAccessed);
Assert.IsNull(source.NumberVolumes);
Assert.IsNull(source.Pages);
Assert.IsNull(source.PatentNumber);
Assert.IsNull(source.PeriodicalTitle);
Assert.IsNull(source.ProductionCompany);
Assert.IsNull(source.PublicationTitle);
Assert.IsNull(source.Publisher);
Assert.IsNull(source.RecordingNumber);
Assert.IsNull(source.RefOrder);
Assert.IsNull(source.Reporter);
Assert.IsNull(source.ShortTitle);
Assert.IsNull(source.StandardNumber);
Assert.IsNull(source.StateOrProvince);
Assert.IsNull(source.Station);
Assert.AreEqual("BookNoLCID", source.Tag);
Assert.IsNull(source.Theater);
Assert.IsNull(source.ThesisType);
Assert.IsNull(source.Type);
Assert.IsNull(source.Url);
Assert.IsNull(source.Version);
Assert.IsNull(source.Volume);
Assert.IsNull(source.Year);
Assert.IsNull(source.YearAccessed);

// Puoi anche creare una nuova sorgente.
Source newSource = new Source("New source", SourceType.Misc);

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);

Guarda anche