Class Bibliography
Owns the bibliography sources associated with a document.
Inherited Members
Namespace: DRIT.Document
Assembly: DRIT.Document.dll
Syntax
public sealed class Bibliography : IEnumerable<Source>, IEnumerable
Properties
Count
Gets the number of registered sources.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
Sources
Gets the ordered source collection.
Declaration
public IList<Source> Sources { get; }
Property Value
| Type | Description |
|---|---|
| IList<Source> |
Methods
Add(Source)
Adds a source and enforces unique citation tags.
Declaration
public Source Add(Source source)
Parameters
| Type | Name | Description |
|---|---|---|
| Source | source | The source to add. |
Returns
| Type | Description |
|---|---|
| Source | The added source. |
Clear()
Removes all bibliography sources.
Declaration
public void Clear()
FindByTag(string)
Finds a source by its citation tag.
Declaration
public Source FindByTag(string tag)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tag | The citation tag. |
Returns
| Type | Description |
|---|---|
| Source | The matching source, or null. |
FormatEntries()
Returns the sources as readable bibliography entries.
Declaration
public string FormatEntries()
Returns
| Type | Description |
|---|---|
| string |
GetEnumerator()
Returns the source enumerator.
Declaration
public IEnumerator<Source> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<Source> |
Remove(Source)
Removes a source from the bibliography.
Declaration
public bool Remove(Source source)
Parameters
| Type | Name | Description |
|---|---|---|
| Source | source | The source to remove. |
Returns
| Type | Description |
|---|---|
| bool | true when the source was removed. |