Table of Contents

Class MarkdownEntryExtensions

Namespace
Songhay.Publications.Extensions
Assembly
Songhay.Publications.dll

Extensions of MarkdownEntry.

public static class MarkdownEntryExtensions
Inheritance
MarkdownEntryExtensions
Inherited Members

Methods

DoNullCheck(MarkdownEntry?)

Effectively validates MarkdownEntry.

public static MarkdownEntry DoNullCheck(this MarkdownEntry? entry)

Parameters

entry MarkdownEntry

The MarkdownEntry entry.

Returns

MarkdownEntry

DoNullCheckForContent(MarkdownEntry?)

Effectively validates Content.

public static MarkdownEntry DoNullCheckForContent(this MarkdownEntry? entry)

Parameters

entry MarkdownEntry

The MarkdownEntry entry.

Returns

MarkdownEntry

ToExtract(MarkdownEntry?, int)

Converts the MarkdownEntry to an extract of the specified length

public static string ToExtract(this MarkdownEntry? entry, int length)

Parameters

entry MarkdownEntry

The MarkdownEntry.

length int

The string-length of the extract.

Returns

string

ToFinalEdit(MarkdownEntry?)

Converts the specified MarkdownEntry into the final edit string

public static string ToFinalEdit(this MarkdownEntry? entry)

Parameters

entry MarkdownEntry

The MarkdownEntry entry.

Returns

string

ToMarkdownEntry(FileInfo)

Converts the specified FileInfo into MarkdownEntry

public static MarkdownEntry ToMarkdownEntry(this FileInfo entry)

Parameters

entry FileInfo

The FileInfo entry.

Returns

MarkdownEntry

ToParagraphs(MarkdownEntry?)

Converts Content to paragraphs

public static string[] ToParagraphs(this MarkdownEntry? entry)

Parameters

entry MarkdownEntry

The MarkdownEntry entry.

Returns

string[]

Touch(MarkdownEntry?, DateTime)

Sets the modification date of the MarkdownEntry.

public static MarkdownEntry Touch(this MarkdownEntry? entry, DateTime date)

Parameters

entry MarkdownEntry

The MarkdownEntry entry.

date DateTime

The touch DateTime.

Returns

MarkdownEntry

With11TyExtract(MarkdownEntry?, int)

Returns the MarkdownEntry with the conventional eleventy extract of the specified length.

public static MarkdownEntry With11TyExtract(this MarkdownEntry? entry, int length)

Parameters

entry MarkdownEntry

The MarkdownEntry.

length int

The string-length of the extract.

Returns

MarkdownEntry

WithContentHeader(MarkdownEntry?)

Returns the MarkdownEntry based on FrontMatter with a title property.

public static MarkdownEntry WithContentHeader(this MarkdownEntry? entry)

Parameters

entry MarkdownEntry

The MarkdownEntry entry.

Returns

MarkdownEntry

WithContentHeader(MarkdownEntry?, int)

Returns the MarkdownEntry based on FrontMatter with a title property.

public static MarkdownEntry WithContentHeader(this MarkdownEntry? entry, int headerLevel)

Parameters

entry MarkdownEntry

The MarkdownEntry entry.

headerLevel int

The header level.

Returns

MarkdownEntry

WithEdit(MarkdownEntry?, Action<MarkdownEntry>?)

Edits the MarkdownEntry with the specified edit action.

public static MarkdownEntry WithEdit(this MarkdownEntry? entry, Action<MarkdownEntry>? editAction)

Parameters

entry MarkdownEntry

The MarkdownEntry.

editAction Action<MarkdownEntry>

the edit Action<T>.

Returns

MarkdownEntry

WithNew11TyFrontMatter(MarkdownEntry?, string?, DateTime, string?, string?)

Returns the MarkdownEntry with conventional 11ty frontmatter.

public static MarkdownEntry WithNew11TyFrontMatter(this MarkdownEntry? entry, string? title, DateTime inceptDate, string? path, string? tag)

Parameters

entry MarkdownEntry

The MarkdownEntry entry.

title string

The title of th entry.

inceptDate DateTime

The incept date of the entry.

path string

The path to the entry.

tag string

The tag of the entry.

Returns

MarkdownEntry

WithNewFrontMatter(MarkdownEntry?, string?, DateTime, int, string?, string?, int, string?)

Returns the MarkdownEntry with conventional frontmatter.

public static MarkdownEntry WithNewFrontMatter(this MarkdownEntry? entry, string? title, DateTime inceptDate, int documentId, string? fileName, string? path, int segmentId, string? tag)

Parameters

entry MarkdownEntry

The MarkdownEntry entry.

title string

The title of th entry.

inceptDate DateTime

The incept date of the entry.

documentId int

the DBMS ID of the entry.

fileName string

the file name (with extension) of the entry.

path string

The path to the entry.

segmentId int

the DBMS ID of the Publications Segment.

tag string

The tag of the entry.

Returns

MarkdownEntry