Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Struct

MarkdownSourceSlice

OfficeIMO.Markdown

Namespace
OfficeIMO.Markdown
Assembly
OfficeIMO.Markdown
Source revision
e96266e685be with working tree changes
Base
ValueType
Modifiers
sealed

Materialized source text for a span-backed syntax node.

Inheritance

  • ValueType
  • MarkdownSourceSlice

Usage

Explore 21 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.

Methods

public static bool TryCreate(string? sourceText, MarkdownSourceSpan sourceSpan, MarkdownSourceTextKind textKind, out MarkdownSourceSlice slice) #

Attempts to create a source slice from the supplied source text and span.

Parameters

sourceText string? required
sourceSpan OfficeIMO.Markdown.MarkdownSourceSpan required
textKind OfficeIMO.Markdown.MarkdownSourceTextKind required
slice OfficeIMO.Markdown.MarkdownSourceSlice required

Returns

bool
public static bool TryCreateFromLineColumns(string? sourceText, MarkdownSourceSpan sourceSpan, MarkdownSourceTextKind textKind, out MarkdownSourceSlice slice) #

Attempts to create a source slice using only line and column coordinates, ignoring any normalized-text offsets.

Parameters

sourceText string? required
sourceSpan OfficeIMO.Markdown.MarkdownSourceSpan required
textKind OfficeIMO.Markdown.MarkdownSourceTextKind required
slice OfficeIMO.Markdown.MarkdownSourceSlice required

Returns

bool

Properties

public MarkdownSourceSpan SourceSpan { get; } #

Source span represented by this slice.

public MarkdownSourceTextKind TextKind { get; } #

Source text kind used to materialize this slice.

public int StartOffset { get; } #

0-based inclusive start offset in the backing source text.

public int EndOffsetInclusive { get; } #

0-based inclusive end offset in the backing source text.

public string Text { get; } #

Exact source text covered by this slice.