API Reference
MarkdownParseResult
Result of parsing markdown into both the object model and a syntax tree.
Inheritance
- Object
- MarkdownParseResult
Usage
Explore 10 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 6
Accepted by parameters 4
Methods
public MarkdownSyntaxNode? FindDeepestFinalNodeAtLine(Int32 lineNumber) #MarkdownSyntaxNode?Finds the deepest syntax node in the final document tree whose source span contains the given 1-based line number.
Parameters
- lineNumber System.Int32
public MarkdownSyntaxNode? FindDeepestFinalNodeAtPosition(Int32 lineNumber, Int32 columnNumber) #MarkdownSyntaxNode?Finds the deepest syntax node in the final document tree whose source span contains the given 1-based line and column.
Parameters
- lineNumber System.Int32
- columnNumber System.Int32
public MarkdownSyntaxNode? FindDeepestFinalNodeContainingSpan(MarkdownSourceSpan span) #MarkdownSyntaxNode?Finds the deepest syntax node in the final document tree whose source span fully contains the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public MarkdownSyntaxNode? FindDeepestFinalNodeOverlappingSpan(MarkdownSourceSpan span) #MarkdownSyntaxNode?Finds the deepest syntax node in the final document tree whose source span overlaps the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public MarkdownSyntaxNode? FindDeepestNodeAtLine(Int32 lineNumber) #MarkdownSyntaxNode?Finds the deepest syntax node whose source span contains the given 1-based line number.
Parameters
- lineNumber System.Int32
public MarkdownSyntaxNode? FindDeepestNodeAtPosition(Int32 lineNumber, Int32 columnNumber) #MarkdownSyntaxNode?Finds the deepest syntax node whose source span contains the given 1-based line and column.
Parameters
- lineNumber System.Int32
- columnNumber System.Int32
public MarkdownSyntaxNode? FindDeepestNodeContainingSpan(MarkdownSourceSpan span) #MarkdownSyntaxNode?Finds the deepest syntax node whose source span fully contains the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public MarkdownSyntaxNode? FindDeepestNodeOverlappingSpan(MarkdownSourceSpan span) #MarkdownSyntaxNode?Finds the deepest syntax node whose source span overlaps the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public Object? FindFinalAssociatedObjectAtLine(Int32 lineNumber) #Object?Finds the nearest associated object in the final syntax tree at the given 1-based line number.
Parameters
- lineNumber System.Int32
public TAssociatedObject? FindFinalAssociatedObjectAtLine<TAssociatedObject>(Int32 lineNumber) #TAssociatedObject?Finds the nearest associated object of the requested type in the final syntax tree at the given 1-based line number.
Type Parameters
- TAssociatedObject
Parameters
- lineNumber System.Int32
public Object? FindFinalAssociatedObjectAtPosition(Int32 lineNumber, Int32 columnNumber) #Object?Finds the nearest associated object in the final syntax tree at the given 1-based line and column.
Parameters
- lineNumber System.Int32
- columnNumber System.Int32
public TAssociatedObject? FindFinalAssociatedObjectAtPosition<TAssociatedObject>(Int32 lineNumber, Int32 columnNumber) #TAssociatedObject?Finds the nearest associated object of the requested type in the final syntax tree at the given 1-based line and column.
Type Parameters
- TAssociatedObject
Parameters
- lineNumber System.Int32
- columnNumber System.Int32
public Object? FindFinalAssociatedObjectContainingSpan(MarkdownSourceSpan span) #Object?Finds the nearest associated object in the final syntax tree whose source span fully contains the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public TAssociatedObject? FindFinalAssociatedObjectContainingSpan<TAssociatedObject>(MarkdownSourceSpan span) #TAssociatedObject?Finds the nearest associated object of the requested type in the final syntax tree whose source span fully contains the given span.
Type Parameters
- TAssociatedObject
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public Object? FindFinalAssociatedObjectOverlappingSpan(MarkdownSourceSpan span) #Object?Finds the nearest associated object in the final syntax tree whose source span overlaps the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public TAssociatedObject? FindFinalAssociatedObjectOverlappingSpan<TAssociatedObject>(MarkdownSourceSpan span) #TAssociatedObject?Finds the nearest associated object of the requested type in the final syntax tree whose source span overlaps the given span.
Type Parameters
- TAssociatedObject
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public MarkdownSyntaxNode? FindFinalNodeForAssociatedObject(Object associatedObject) #MarkdownSyntaxNode?Finds the first node in the final syntax tree associated with the supplied model object.
Parameters
- associatedObject System.Object
public IReadOnlyList<MarkdownSyntaxNode> FindFinalNodePathAtLine(Int32 lineNumber) #IReadOnlyList<MarkdownSyntaxNode>Finds the syntax node path from the final document root to the deepest node containing the given 1-based line number.
Parameters
- lineNumber System.Int32
public IReadOnlyList<MarkdownSyntaxNode> FindFinalNodePathAtPosition(Int32 lineNumber, Int32 columnNumber) #IReadOnlyList<MarkdownSyntaxNode>Finds the syntax node path from the final document root to the deepest node containing the given 1-based line and column.
Parameters
- lineNumber System.Int32
- columnNumber System.Int32
public IReadOnlyList<MarkdownSyntaxNode> FindFinalNodePathContainingSpan(MarkdownSourceSpan span) #IReadOnlyList<MarkdownSyntaxNode>Finds the syntax node path from the final document root to the deepest node whose source span fully contains the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public IReadOnlyList<MarkdownSyntaxNode> FindFinalNodePathOverlappingSpan(MarkdownSourceSpan span) #IReadOnlyList<MarkdownSyntaxNode>Finds the syntax node path from the final document root to the deepest node whose source span overlaps the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public MarkdownSyntaxNode? FindNearestBlockAtLine(Int32 lineNumber) #MarkdownSyntaxNode?Finds the nearest block-like syntax node whose source span contains the given 1-based line number.
Parameters
- lineNumber System.Int32
public MarkdownSyntaxNode? FindNearestBlockAtPosition(Int32 lineNumber, Int32 columnNumber) #MarkdownSyntaxNode?Finds the nearest block-like syntax node whose source span contains the given 1-based line and column.
Parameters
- lineNumber System.Int32
- columnNumber System.Int32
public MarkdownSyntaxNode? FindNearestBlockContainingSpan(MarkdownSourceSpan span) #MarkdownSyntaxNode?Finds the nearest block-like syntax node whose source span fully contains the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public MarkdownSyntaxNode? FindNearestBlockOverlappingSpan(MarkdownSourceSpan span) #MarkdownSyntaxNode?Finds the nearest block-like syntax node whose source span overlaps the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public MarkdownSyntaxNode? FindNearestFinalBlockAtLine(Int32 lineNumber) #MarkdownSyntaxNode?Finds the nearest block-like syntax node in the final document tree whose source span contains the given 1-based line number.
Parameters
- lineNumber System.Int32
public MarkdownSyntaxNode? FindNearestFinalBlockAtPosition(Int32 lineNumber, Int32 columnNumber) #MarkdownSyntaxNode?Finds the nearest block-like syntax node in the final document tree whose source span contains the given 1-based line and column.
Parameters
- lineNumber System.Int32
- columnNumber System.Int32
public MarkdownSyntaxNode? FindNearestFinalBlockContainingSpan(MarkdownSourceSpan span) #MarkdownSyntaxNode?Finds the nearest block-like syntax node in the final document tree whose source span fully contains the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public MarkdownSyntaxNode? FindNearestFinalBlockOverlappingSpan(MarkdownSourceSpan span) #MarkdownSyntaxNode?Finds the nearest block-like syntax node in the final document tree whose source span overlaps the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public IReadOnlyList<MarkdownSyntaxNode> FindNodePathAtLine(Int32 lineNumber) #IReadOnlyList<MarkdownSyntaxNode>Finds the syntax node path from the document root to the deepest node containing the given 1-based line number.
Parameters
- lineNumber System.Int32
public IReadOnlyList<MarkdownSyntaxNode> FindNodePathAtPosition(Int32 lineNumber, Int32 columnNumber) #IReadOnlyList<MarkdownSyntaxNode>Finds the syntax node path from the document root to the deepest node containing the given 1-based line and column.
Parameters
- lineNumber System.Int32
- columnNumber System.Int32
public IReadOnlyList<MarkdownSyntaxNode> FindNodePathContainingSpan(MarkdownSourceSpan span) #IReadOnlyList<MarkdownSyntaxNode>Finds the syntax node path from the document root to the deepest node whose source span fully contains the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public IReadOnlyList<MarkdownSyntaxNode> FindNodePathOverlappingSpan(MarkdownSourceSpan span) #IReadOnlyList<MarkdownSyntaxNode>Finds the syntax node path from the document root to the deepest node whose source span overlaps the given span.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
public MarkdownDoc RequireValue() #MarkdownDocReturns the produced value or throws when the operation did not complete.
public Boolean TryCreateOriginalSourceSlice(Object associatedObject, out MarkdownSourceSlice slice) #BooleanCreates an original-input source slice for the final syntax node associated with the supplied model object.
Parameters
- associatedObject System.Object
- slice OfficeIMO.Markdown.MarkdownSourceSlice
public Boolean TryCreateOriginalSourceSlice(Object associatedObject, out MarkdownSourceSlice slice, out MarkdownOriginalSourceSliceFailureReason failureReason) #BooleanCreates an original-input source slice for the final syntax node associated with the supplied model object.
Parameters
- associatedObject System.Object
- slice OfficeIMO.Markdown.MarkdownSourceSlice
- failureReason OfficeIMO.Markdown.MarkdownOriginalSourceSliceFailureReason
public Boolean TryCreateOriginalSourceSlice(MarkdownSyntaxNode node, out MarkdownSourceSlice slice) #BooleanCreates a source slice over the original reader input when it is safely equivalent to the normalized span text.
Parameters
- node OfficeIMO.Markdown.MarkdownSyntaxNode
- slice OfficeIMO.Markdown.MarkdownSourceSlice
public Boolean TryCreateOriginalSourceSlice(MarkdownSyntaxNode node, out MarkdownSourceSlice slice, out MarkdownOriginalSourceSliceFailureReason failureReason) #BooleanCreates a source slice over the original reader input when it is safely equivalent to the normalized span text.
Parameters
- node OfficeIMO.Markdown.MarkdownSyntaxNode
- slice OfficeIMO.Markdown.MarkdownSourceSlice
- failureReason OfficeIMO.Markdown.MarkdownOriginalSourceSliceFailureReason
public Boolean TryCreateOriginalSourceSlice(MarkdownSourceSpan span, out MarkdownSourceSlice slice) #BooleanCreates a source slice over the original reader input when it is safely equivalent to the normalized span text.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
- slice OfficeIMO.Markdown.MarkdownSourceSlice
public Boolean TryCreateOriginalSourceSlice(MarkdownSourceSpan span, out MarkdownSourceSlice slice, out MarkdownOriginalSourceSliceFailureReason failureReason) #BooleanCreates a source slice over the original reader input when it is safely equivalent to the normalized span text.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
- slice OfficeIMO.Markdown.MarkdownSourceSlice
- failureReason OfficeIMO.Markdown.MarkdownOriginalSourceSliceFailureReason
public Boolean TryCreateSourceMapping(Object associatedObject, out MarkdownSourceMapping mapping) #BooleanCreates a source mapping that always includes the normalized slice and includes the original-input slice when it maps safely.
Parameters
- associatedObject System.Object
- mapping OfficeIMO.Markdown.MarkdownSourceMapping
public Boolean TryCreateSourceMapping(MarkdownSyntaxNode node, out MarkdownSourceMapping mapping) #BooleanCreates a source mapping that always includes the normalized slice and includes the original-input slice when it maps safely.
Parameters
- node OfficeIMO.Markdown.MarkdownSyntaxNode
- mapping OfficeIMO.Markdown.MarkdownSourceMapping
public Boolean TryCreateSourceMapping(MarkdownSourceSpan span, out MarkdownSourceMapping mapping) #BooleanCreates a source mapping that always includes the normalized slice and includes the original-input slice when it maps safely.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
- mapping OfficeIMO.Markdown.MarkdownSourceMapping
public Boolean TryCreateSourceSlice(Object associatedObject, out MarkdownSourceSlice slice) #BooleanCreates a source slice for the final syntax node associated with the supplied model object.
Parameters
- associatedObject System.Object
- slice OfficeIMO.Markdown.MarkdownSourceSlice
public Boolean TryCreateSourceSlice(MarkdownSyntaxNode node, out MarkdownSourceSlice slice) #BooleanCreates a source slice over the normalized markdown text that backs source spans.
Parameters
- node OfficeIMO.Markdown.MarkdownSyntaxNode
- slice OfficeIMO.Markdown.MarkdownSourceSlice
public Boolean TryCreateSourceSlice(MarkdownSourceSpan span, out MarkdownSourceSlice slice) #BooleanCreates a source slice over the normalized markdown text that backs source spans.
Parameters
- span OfficeIMO.Markdown.MarkdownSourceSpan
- slice OfficeIMO.Markdown.MarkdownSourceSlice
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public MarkdownDoc Value { get; } #Gets the produced value, or null when the operation did not complete.
public Boolean Succeeded { get; } #Gets whether the operation completed successfully.
public MarkdownSyntaxNode SyntaxTree { get; } #The original syntax tree produced before document transforms were applied. When a transform replaces the document instance, this tree intentionally drops semantic MarkdownSyntaxNode.AssociatedObject bindings to avoid stale object references. Use MarkdownParseResult.FinalSyntaxTree for syntax-to-model navigation against MarkdownParseResult.Document.
public MarkdownSyntaxNode FinalSyntaxTree { get; } #The syntax tree corresponding to the final returned MarkdownParseResult.Document.
public String SourceMarkdown { get; } #The normalized markdown source text used to compute syntax source spans.
public String OriginalMarkdown { get; } #Raw markdown input retained when MarkdownReaderOptions.PreserveTrivia was enabled; otherwise this falls back to MarkdownParseResult.SourceMarkdown.
public Boolean PreservesOriginalMarkdown { get; } #Indicates whether MarkdownParseResult.OriginalMarkdown contains the exact reader input captured before input normalization and line-ending normalization.
public IReadOnlyList<MarkdownDocumentTransformDiagnostic> TransformDiagnostics { get; } #Optional document-transform diagnostics captured during parsing.
public IReadOnlyList<MarkdownGeneratedSyntaxDiagnostic> GeneratedSyntaxDiagnostics { get; } #Diagnostics for final syntax nodes generated from semantic content rather than exact parsed source.
public IReadOnlyList<MarkdownReferenceLinkDefinition> ReferenceLinkDefinitions { get; } #Effective reference-style link definitions collected during parsing, in source order where spans are available.
public IReadOnlyList<MarkdownAbbreviationDefinition> AbbreviationDefinitions { get; } #Effective abbreviation definitions collected during parsing, in source order where spans are available.