Show / Hide Table of Contents

Class DocumentBase

Abstract base class for an IDocument, containing functionality which is neutral to the specific implementation.

Inheritance
System.Object
DocumentBase
AngleSharpDocument
HapDocument
XmlDocument
Implements
IDocument
IHasDocumentSourceInfo
IHasNodes
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 Source

DocumentBase(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 Source

Source

A field to get the document source info.

Declaration
protected readonly IDocumentSourceInfo Source
Field Value
Type Description
IDocumentSourceInfo

Properties

| Improve this Doc View Source

RootNode

Gets the root node for the current document.

Declaration
public abstract INode RootNode { get; }
Property Value
Type Description
INode

The root node.

| Improve this Doc View Source

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 Source

AddCommentToBeginningOfDocument(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 Source

IHasNodes.GetChildNodes()

Declaration
IEnumerable<INode> IHasNodes.GetChildNodes()
Returns
Type Description
System.Collections.Generic.IEnumerable<INode>

Implements

IDocument
IHasDocumentSourceInfo
IHasNodes
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX