Class NodeSourceInfo
An object which encapsulates information about the source of a single DOM node.
Inheritance
Implements
Inherited Members
Namespace: ZptSharp.Rendering
Assembly: ZptSharp.Abstractions.dll
Syntax
public sealed class NodeSourceInfo : IEquatable<NodeSourceInfo>
Constructors
| Improve this Doc View SourceNodeSourceInfo(IDocumentSourceInfo, Nullable<Int32>, Nullable<Int32>)
Initializes a new instance of the NodeSourceInfo class.
Declaration
public NodeSourceInfo(IDocumentSourceInfo document, int? startTagLineNumber = default(int? ), int? endTagLineNumber = default(int? ))
Parameters
Type | Name | Description |
---|---|---|
IDocumentSourceInfo | document | Document. |
System.Nullable<System.Int32> | startTagLineNumber | The line number for the start-tag. |
System.Nullable<System.Int32> | endTagLineNumber | The line number for the end-tag. |
Properties
| Improve this Doc View SourceDocument
Gets source information about the document where this node originated.
Declaration
public IDocumentSourceInfo Document { get; }
Property Value
Type | Description |
---|---|
IDocumentSourceInfo | The document. |
EndTagLineNumber
Gets the line number for the end of the node.
Declaration
public int? EndTagLineNumber { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> | The line number. |
StartTagLineNumber
Gets the line number for the beginning of the node.
Declaration
public int? StartTagLineNumber { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> | The line number. |
Methods
| Improve this Doc View SourceCreateChild(Nullable<Int32>, Nullable<Int32>)
Creates a child NodeSourceInfo which uses the same document as the current instance, but different line number(s).
Declaration
public NodeSourceInfo CreateChild(int? startTagLineNumber = default(int? ), int? endTagLineNumber = default(int? ))
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | startTagLineNumber | The line number for the start-tag. |
System.Nullable<System.Int32> | endTagLineNumber | The line number for the end-tag. |
Returns
Type | Description |
---|---|
NodeSourceInfo | The child source info. |
Equals(Object)
Determines whether the specified System.Object is equal to the current NodeSourceInfo.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare with the current NodeSourceInfo. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
Equals(NodeSourceInfo)
Determines whether the specified NodeSourceInfo is equal to the
current NodeSourceInfo. Will only return true
if the objects are reference-equal.
Declaration
public bool Equals(NodeSourceInfo other)
Parameters
Type | Name | Description |
---|---|---|
NodeSourceInfo | other | The NodeSourceInfo to compare with the current NodeSourceInfo. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetHashCode()
Serves as a hash function for a NodeSourceInfo object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a hash table. |
Overrides
ToString()
Returns a System.String that represents the current NodeSourceInfo.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents the current NodeSourceInfo. |