Divooka.Core
Divooka.Core.Helpers.AssemblyHelper.ParcelNExTDistributionRuntimeDirectory
Get the root folder of the Parcel NExT distribution.
Divooka.Core.Helpers.AssemblyHelper.InterpreterAssemblyDirectory
Directory of the interpreter, which is usually the same as the core engine directory.
Divooka.Core.Helpers.AssemblyHelper.GetAssemblyVersions()
Retrieves version information from the specified assembly.
Parameters
| Name | Description | Default |
|---|---|---|
assembly |
The assembly from which to extract version details. | |
assemblyVersion |
The assembly version. This is the version embedded in the assembly's manifest (set via the AssemblyVersion attribute) and is used by the .NET runtime for binding. | |
fileVersion |
The file version. This version is associated with the physical file (set via the AssemblyFileVersion attribute) and is displayed in the file's properties. | |
productVersion |
The product version. This version represents the overall product release (often set using the AssemblyInformationalVersion attribute) and may include additional descriptive information. |
Divooka.Core.Helpers.AssemblyHelper.GetInterface``1()
Find and get instance of interface.
Divooka.Core.Helpers.CSVHelper.ReadCSVFile()
Read CSV from file.
Divooka.Core.Helpers.CSVHelper.ParseCSV()
Parse CSV text.
Divooka.Core.Helpers.CSVHelper.Parse()
Parse CSV as double array
Parameters
| Name | Description | Default |
|---|---|---|
trimEntries |
Trim white spaces of entries. Useful when the CSV file is hand authored. |
Divooka.Core.Helpers.DocumentationHelper
Provides parsing service for .net assembly generated XML documentations.
Generates MD documentation from generated XML documentation files.
Divooka.Core.Helpers.DocumentationHelper.AdditionalInputMetadata.TextFormat
What kind of text is this
Divooka.Core.Helpers.DocumentationHelper.AdditionalInputMetadata.DefaultValue
A string representation of default value.
Remarks
Conventionally we will find a static function taking string and output the required type from the object type definition.
Divooka.Core.Helpers.DocumentationHelper.Argument
Provides meta-data/documentation for the arguments of a member function.
Divooka.Core.Helpers.DocumentationHelper.Argument.#ctor()
Remarks
Arguments may be transformed a few times during the loading pipeline. So we try to keep everything explicit in the constructor to avoid accidentally missing things.
Divooka.Core.Helpers.DocumentationHelper.Member
Provides meta-data/documentation on the member of a class.
Divooka.Core.Helpers.DocumentationHelper.Member.ExternalLink
Parameters
| Name | Description | Default |
|---|---|---|
Name |
Category/Type of link | |
Header |
Descriptive header | |
Type |
Content type of link |
Divooka.Core.Helpers.DocumentationHelper.Member.ExternalLink.#ctor()
Parameters
| Name | Description | Default |
|---|---|---|
Name |
Category/Type of link | |
Header |
Descriptive header | |
Type |
Content type of link |
Divooka.Core.Helpers.DocumentationHelper.Member.ExternalLink.Name
Category/Type of link
Divooka.Core.Helpers.DocumentationHelper.Member.ExternalLink.Header
Descriptive header
Divooka.Core.Helpers.DocumentationHelper.Member.ExternalLink.Type
Content type of link
Divooka.Core.Helpers.DocumentationHelper.Member.FormalName
Full assembly name, per https://learn.microsoft.com/en-ca/dotnet/csharp/language-reference/language-specification/documentation-comments#id-strings
Divooka.Core.Helpers.DocumentationHelper.Member.Arguments
Arguments for functions or classes/types with primary constructors
Divooka.Core.Helpers.DocumentationHelper.Member.DisplayName
An arbitrary override name
Divooka.Core.Helpers.DocumentationHelper.Member.ReturnName
Name of return value
Divooka.Core.Helpers.DocumentationHelper.Parse()
Pseudo entry
Divooka.Core.Helpers.DocumentationHelper.GetSummaryText()
Deals with see/seealso etc. nodes within the node body, in which case just use `e.SelectSingleNode("summary")?.InnerText.Trim()` is not enough.
Parameters
| Name | Description | Default |
|---|---|---|
summaryNode |
Documentation node element. |
Returns
"Expanded" inner text.
Divooka.Core.Helpers.EmbeddedResourceHelper.ReadBinaryResourceStrict()
Remarks
Caller must dispose stream.
Divooka.Core.Helpers.EmbeddedResourceHelper.ReadBinaryResource()
Remarks
Caller must dispose stream.
Divooka.Core.Helpers.PathHelper.IsAbsolutePath()
Returns true only for fully qualified (absolute) paths (drive‐letter or UNC on Windows, rooted /… on Unix)
Remarks
This function is a bit overkill. For the most scenarios, just call ath.IsPathFullyQualified.
Divooka.Core.Helpers.PathHelper.IsTrulyAbsolute()
For absolute paths only (no “current‐drive” rooted paths).
Remarks
This utility first checks `IsPathRooted`, then inspects `GetPathRoot(path)` to confirm it’s either a drive‐letter root(`C:\`) or a UNC share(`\\server\share`)
Divooka.Core.Helpers.EnvironmentVariableHelper
Deals with environment variables;
Includes helpers in identifying executable location related to PATH env var
Divooka.Core.Helpers.EnvironmentVariableHelper.FindProgram()
Find disk location of program
Divooka.Core.Helpers.EnvironmentVariableHelper.FindProgramCustom()
Search program in custom paths.
Divooka.Core.Helpers.EnvironmentVariableHelper.AddToPath()
Adds the given folder to the current process PATH (so it takes effect immediately)
and to the user's environment PATH (so new consoles see it in the future).
Divooka.Core.Helpers.EnvironmentVariableHelper.JoinEnvironmentPaths()
Parameters
| Name | Description | Default |
|---|---|---|
paths |
Divooka.Core.Helpers.EnvironmentVariableHelper.SplitAsEnvironmentPaths()
Remarks
Windows uses ; as the hard separator between PATH entries; When path contains semi-colon which is a valid character in Windows, the entry is wrapped in double-quotes — any `;` inside those quotes is treated as part of the path, not a separator.
Divooka.Core.Helpers.FileSystemHelper
Some very handy and often used helper functions
Remarks
TODO: There is a dependency imperfection - at the moment this "overlaps" with Zora Standard. We need to sort our whether Standard should depend on Core or ther otherway around - or whether Standard should be Part of core. Ideally, Standard remain as a package. Well at the moment it kind of makes sense since Zora Standard is mostly wrappers - in this case instead of wrapping .Net Core, we wrap our own code, aka. FileSystemHelper.
Divooka.Core.Helpers.FileSystemHelper.GetApplicationDataFile()
Gets path to a file that's unique to a named application.
Divooka.Core.Helpers.FileSystemHelper.GetApplicationDataFile()
Gets path to a file that's unique to a named application within a folder.
Divooka.Core.Helpers.FileSystemHelper.GetApplicationDataFile()
Gets path to a file that's unique to a named application within subfolders.
Divooka.Core.Helpers.FileSystemHelper.GetApplicationDataFolder()
Gets path to a folder that's unique to a named application, optionally creates the folder.
Divooka.Core.Helpers.FileSystemHelper.GetApplicationDataFolder()
Gets path to a subfolder folder within a uniquely named application, optionally creates the folder.
Divooka.Core.Helpers.FileSystemHelper.GetApplicationDataFolder()
Gets path to a subfolder folder within a uniquely named application, optionally creates the folder.
Divooka.Core.Helpers.FileSystemHelper.GetFilePathsWithPattern()
Remarks
TODO: Make return value make more sense (not just "Array") - give it a name.
TODO: Document what kind of pattern it's taking (Microsoft file pattern or regular expression?)
Divooka.Core.Helpers.FileSystemHelper.GetFileSizeString()
Get file size in human readable string with suffix like Kb etc.
Parameters
| Name | Description | Default |
|---|---|---|
path |
File path |
Returns
File size in the format `<Size><Size Name>`
Divooka.Core.Helpers.JSONHelper.EscapeJsonString()
Escapes a single JSON string literal
Divooka.Core.Helpers.JSONHelper.DecodeJsonString()
Reverse of escaping JSON string
Divooka.Core.Helpers.Measure
A disposable measuring utility.
Divooka.Core.Helpers.NodeAttributeNameHelper
Provide standard parsing for node attribute names
Divooka.Core.Helpers.NodeAttributeNameHelper.GetNameTypeOnly()
Extract attribute name and type from annotated syntax; Effectively trims additional symbols.
Divooka.Core.Helpers.NodeAttributeNameHelper.GetNameOnly()
Extract attribute name from annotated syntax; Effectively trims additional symbols.
Divooka.Core.Helpers.PasswordHasher.HashPassword()
Hashes a password using PBKDF2 with a random salt.
Parameters
| Name | Description | Default |
|---|---|---|
password |
The plain text password. |
Returns
A hashed password string containing the salt and hash.
Divooka.Core.Helpers.PasswordHasher.VerifyPassword()
Verifies a password against a hashed password.
Parameters
| Name | Description | Default |
|---|---|---|
password |
The plain text password. | |
hashedPassword |
The hashed password to verify against. |
Returns
True if the password matches; otherwise, false.
Divooka.Core.Helpers.ProcessHelper
Provides foundational routines for Python interpreter, Pipeline package and server/client inter-operation
Divooka.Core.Helpers.ProcessHelper.GetOutput()
Remarks
TODO: Provide environment variables override or at least to clear all environments
Divooka.Core.Helpers.ProcessHelper.GetOutput()
Run process in given directory and retrieve standard output.
Parameters
| Name | Description | Default |
|---|---|---|
executable |
Executable name/path. | |
workingDirectory |
Working directory. |
Returns
Standard output of process
Divooka.Core.Helpers.ProcessHelper.StartProcessInBackground()
Starts a process in the background, optionally overriding or clearing inherited environment variables.
Remarks
Note that env‐vars only work when useShellExecute = false; if passed true we simply ignore them.
Parameters
| Name | Description | Default |
|---|---|---|
useShellExecute |
Whether to use the OS shell to start the process. Must be false to modify environment variables. | |
programName |
The executable or command to run. | |
startingFolder |
Working directory for the new process. | |
arguments |
Arguments to pass to the process. | |
environmentVariables |
A dictionary of environment variables to set or override in the child process. Ignored if null or if UseShellExecute is true. | |
clearExistingEnvVars |
If true, clears all inherited environment variables before applying environmentVariables. Only meaningful when environmentVariables is non-null and UseShellExecute is false. |
Divooka.Core.Helpers.ProcessHelper.UrlOpeningHandler
Typically implemented by the server, which will then communicate with the front-end to open a program/path/url in an appropriate fashion.
Divooka.Core.Helpers.ProcessHelper.OpenFileWithDefaultProgramInterpreted()
Seeks opening behavior through the delegate Divooka.Core.Helpers.ProcessHelper.OpenPathWithDefaultHandlerDelegate.
Packages should generally use this instead of .
Remarks
To facilitate cross-platform behavior and server-client architecture, the act of opening a file/url with default program (or just to start some program on the user side) should ultimately be handled by the front-end (e.g. on a web environment if we open a process/url it's started on the server, but what we really want would be to open that url in a new browser tab); This function provides an indirection and delete the job to any particular server/front-end.
Divooka.Core.Helpers.ProcessHelper.OpenUriWithDefaultProgram()
Open URI with default program. For websites this opens browser; For local paths this opens file explore.
Parameters
| Name | Description | Default |
|---|---|---|
uri |
Divooka.Core.Helpers.StringHelper.SplitCommandLineArguments()
Works both on command line arguments and csv lines (without line escaping support)
TODO: Is this functionally equivalent to ? If so, we should merge the two.
Remarks
In some codes I authored before, this is also called "SplitArgumentsLikeCsv"
Divooka.Core.Helpers.StringHelper.EscapeCSV()
Put strings together in a safe to parse way
Divooka.Core.Helpers.StringHelper.DeserializeKeyValues()
Deserializes a YAML-like string into a dictionary of key-value pairs.
Supports multiline values using the YAML block literal style (using "|" and indented lines).
Lines starting with '#' are treated as comments and skipped.
Also skips empty lines.
Parameters
| Name | Description | Default |
|---|---|---|
text |
The YAML-like string with '#' comments. |
Returns
Empty dictionary or a dictionary containing the deserialized key-value pairs..
Divooka.Core.Helpers.StringHelper.SerializeKeyValues()
Serializes a dictionary of key-value pairs to a YAML formatted string,
handling multiline values gracefully using YAML block literal style.
Parameters
| Name | Description | Default |
|---|---|---|
stringValues |
The dictionary containing key-value pairs. |
Returns
A YAML formatted string representing the key-value pairs.
Divooka.Core.Helpers.StringHelper.CountEnglishWords()
Count number of english words in a sentence delimited by whitespaces.
Divooka.Core.Helpers.XmlDocParameterParser.SplitParameterTypes()
Splits a parameter list string extracted from XML documentation
into individual parameter types. Handles generic curly-brace syntax.
Example: "System.Double,System.Func{System.Double,System.Double}"
Parameters
| Name | Description | Default |
|---|---|---|
parameterList |
The raw parameter list (e.g., everything inside parentheses from the XML doc). |
Returns
An array of parameter type strings.
Divooka.Core.Primitives.MultilineText
Multi-line string
Divooka.Core.Primitives.Number
Remarks
Consolidate with standard library NumberRoutines
Divooka.Core.Primitives.Range
Number slider
Divooka.Core.Primitives.SimplexString
A string structure that can either represent a single scalar string or an array of strings
Divooka.Core.Primitives.StringMap
Placeholder, not used right now, but this particular generic instance is very common.
When Divooka is able to handle generics, we will not need it.
Divooka.Core.TypedTexts.HTMLText
A text representing HTML
Divooka.Core.TypedTexts.JSONText
A text representing JSOn