Class DocumentBase
Abstract base class for an IDocument, containing functionality which is neutral to the specific implementation.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ZptSharp.Dom
Assembly: ZptSharp.Abstractions.dll
Syntax
public abstract class DocumentBase : IDocument, IHasDocumentSourceInfo, IHasNodes
Constructors
| Improve this Doc View SourceDocumentBase(IDocumentSourceInfo)
Initializes a new instance of the DocumentBase class.
Declaration
protected DocumentBase(IDocumentSourceInfo source)
Parameters
Type | Name | Description |
---|---|---|
IDocumentSourceInfo | source | The source info for the document. |
Fields
| Improve this Doc View SourceSource
A field to get the document source info.
Declaration
protected readonly IDocumentSourceInfo Source
Field Value
Type | Description |
---|---|
IDocumentSourceInfo |
Properties
| Improve this Doc View SourceRootNode
Gets the root node for the current document.
Declaration
public abstract INode RootNode { get; }
Property Value
Type | Description |
---|---|
INode | The root node. |
SourceInfo
Gets information which indicates the original source of the document (for example, a file path).
Declaration
public virtual IDocumentSourceInfo SourceInfo { get; }
Property Value
Type | Description |
---|---|
IDocumentSourceInfo | The source info. |
Methods
| Improve this Doc View SourceAddCommentToBeginningOfDocument(String)
Where-supported, adds a comment before the first node node in the document. In cases where the underlying document implementation does not support this, a workaround is acceptable (such as commenting immediately inside the first node).
Declaration
public abstract void AddCommentToBeginningOfDocument(string commentText)
Parameters
Type | Name | Description |
---|---|---|
System.String | commentText |
Explicit Interface Implementations
| Improve this Doc View SourceIHasNodes.GetChildNodes()
Declaration
IEnumerable<INode> IHasNodes.GetChildNodes()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<INode> |