Table of Contents

Class JsonElementExtensions

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

Extensions of JsonElement.

public static class JsonElementExtensions
Inheritance
JsonElementExtensions
Inherited Members

Methods

GetAddEntryExtractArg(JsonElement, DirectoryInfo?)

Gets the arguments for Activity method.

public static string GetAddEntryExtractArg(this JsonElement element, DirectoryInfo? presentationInfo)

Parameters

element JsonElement

The JsonElement.

presentationInfo DirectoryInfo

The presentation information.

Returns

string

GetCompressed11TyIndexArgs(JsonElement, DirectoryInfo?)

Gets the arguments for Activity method.

public static (DirectoryInfo entryRootInfo, DirectoryInfo indexRootInfo, string indexFileName) GetCompressed11TyIndexArgs(this JsonElement element, DirectoryInfo? presentationInfo)

Parameters

element JsonElement

The JsonElement.

presentationInfo DirectoryInfo

The presentation information.

Returns

(DirectoryInfo entryRootInfo, DirectoryInfo indexRootInfo, string indexFileName)

GetExpandUrisArgs(JsonElement, DirectoryInfo?)

Gets the arguments for Activity method.

public static (string entryPath, string collapsedHost) GetExpandUrisArgs(this JsonElement element, DirectoryInfo? presentationInfo)

Parameters

element JsonElement

The JsonElement.

presentationInfo DirectoryInfo

The presentation information.

Returns

(string entryPath, string collapsedHost)

GetFindChangeArgs(JsonElement, DirectoryInfo?)

Gets the arguments for Activity method.

public static (string input, string pattern, string replacement, bool useRegex, string outputPath) GetFindChangeArgs(this JsonElement element, DirectoryInfo? presentationInfo)

Parameters

element JsonElement

The JsonElement.

presentationInfo DirectoryInfo

The presentation information.

Returns

(string input, string pattern, string replacement, bool useRegex, string outputPath)

GetGenerateEntryArgs(JsonElement, DirectoryInfo?)

Gets the arguments for Activity method.

public static (DirectoryInfo entryDraftsRootInfo, string title) GetGenerateEntryArgs(this JsonElement element, DirectoryInfo? presentationInfo)

Parameters

element JsonElement

The JsonElement.

presentationInfo DirectoryInfo

The presentation information.

Returns

(DirectoryInfo entryDraftsRootInfo, string title)

GetPublicationCommand(JsonElement)

Gets the publication command.

public static string? GetPublicationCommand(this JsonElement element)

Parameters

element JsonElement

The JsonElement.

Returns

string

GetPublishEntryArgs(JsonElement, DirectoryInfo?)

Gets the arguments for Activity method.

public static (DirectoryInfo entryDraftsRootInfo, DirectoryInfo entryRootInfo, string entryFileName) GetPublishEntryArgs(this JsonElement element, DirectoryInfo? presentationInfo)

Parameters

element JsonElement

The JsonElement.

presentationInfo DirectoryInfo

The presentation information.

Returns

(DirectoryInfo entryRootInfo, DirectoryInfo indexRootInfo, string indexFileName)

ToBoxedValue(JsonElement)

Converts the specified JsonElement to a boxed object of boxed objects.

public static object? ToBoxedValue(this JsonElement element)

Parameters

element JsonElement

the JsonElement

Returns

object

Remarks

This method helps the YamlDotNetYamlDotNet.Serialization.SerializerBuilder serialize JsonElement to YAML without “shadow-converting” all property values to string.

See ToYaml(JsonElement).

ToObject<TObject>(JsonElement)

Converts the specified JsonElement to TObject.

public static TObject? ToObject<TObject>(this JsonElement element)

Parameters

element JsonElement

the specified JsonElement

Returns

TObject

Type Parameters

TObject

the type to convert to

ToYaml(JsonElement)

Converts the specified JsonElement to a YAML string.

public static string ToYaml(this JsonElement element)

Parameters

element JsonElement

the JsonElement

Returns

string