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
JsonElementThe JsonElement.
presentationInfo
DirectoryInfoThe presentation information.
Returns
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
JsonElementThe JsonElement.
presentationInfo
DirectoryInfoThe presentation information.
Returns
GetExpandUrisArgs(JsonElement, DirectoryInfo?)
Gets the arguments for Activity method.
public static (string entryPath, string collapsedHost) GetExpandUrisArgs(this JsonElement element, DirectoryInfo? presentationInfo)
Parameters
element
JsonElementThe JsonElement.
presentationInfo
DirectoryInfoThe presentation information.
Returns
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
JsonElementThe JsonElement.
presentationInfo
DirectoryInfoThe presentation information.
Returns
GetGenerateEntryArgs(JsonElement, DirectoryInfo?)
Gets the arguments for Activity method.
public static (DirectoryInfo entryDraftsRootInfo, string title) GetGenerateEntryArgs(this JsonElement element, DirectoryInfo? presentationInfo)
Parameters
element
JsonElementThe JsonElement.
presentationInfo
DirectoryInfoThe presentation information.
Returns
GetPublicationCommand(JsonElement)
Gets the publication command.
public static string? GetPublicationCommand(this JsonElement element)
Parameters
element
JsonElementThe JsonElement.
Returns
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
JsonElementThe JsonElement.
presentationInfo
DirectoryInfoThe presentation information.
Returns
ToBoxedValue(JsonElement)
Converts the specified JsonElement to a boxed object of boxed objects.
public static object? ToBoxedValue(this JsonElement element)
Parameters
element
JsonElementthe JsonElement
Returns
Remarks
This method helps the YamlDotNet
YamlDotNet.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
JsonElementthe 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
JsonElementthe JsonElement