Class AnnotationProvider
Implementation of IGetsAnnotationForNode which returns a string based on the source information for the node, along with dividing lines.
Inheritance
System.Object
AnnotationProvider
Implements
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.SourceAnnotation
Assembly: ZptSharp.dll
Syntax
public class AnnotationProvider : IGetsAnnotationForNode
Constructors
| Improve this Doc View SourceAnnotationProvider(IGetsSourceAnnotationString)
Initializes a new instance of the AnnotationProvider class.
Declaration
public AnnotationProvider(IGetsSourceAnnotationString sourceInfoProvider)
Parameters
Type | Name | Description |
---|---|---|
IGetsSourceAnnotationString | sourceInfoProvider | Source info provider. |
Methods
| Improve this Doc View SourceGetAnnotation(INode, TagType)
Gets the annotation text for the node.
Declaration
public string GetAnnotation(INode node, TagType tagType = TagType.Start)
Parameters
Type | Name | Description |
---|---|---|
INode | node | Node. |
TagType | tagType | The tag type to use for the annotation. |
Returns
Type | Description |
---|---|
System.String | The annotation text. |
GetDivider()
Gets a string to be used as a divider, indicating source annotation.
Declaration
public static string GetDivider()
Returns
Type | Description |
---|---|
System.String |
GetPreReplacementAnnotation(INode, TagType)
Gets the annotation text for the node, using the pre-replacement source annotation for the node.
Declaration
public string GetPreReplacementAnnotation(INode node, TagType tagType = TagType.Start)
Parameters
Type | Name | Description |
---|---|---|
INode | node | Node. |
TagType | tagType | The tag type to use for the annotation. |
Returns
Type | Description |
---|---|
System.String | The annotation text. |