Skip to content
ChartForgeX
Class

TopologyIconPackJson

ChartForgeX.Topology

Namespace
ChartForgeX.Topology
Assembly
ChartForgeX
Modifiers
static

Reads and writes dependency-free JSON manifests for topology icon packs.

Inheritance

  • object
  • TopologyIconPackJson

Methods

AddJsonPack 2 overloads
public static TopologyIconCatalog AddJsonPack(TopologyIconCatalog catalog, string json) #

Adds a JSON manifest icon pack to the catalog.

Parameters

catalog ChartForgeX.Topology.TopologyIconCatalog required
The target catalog.
json string required
The JSON manifest.

Returns

TopologyIconCatalog The current catalog.
public static TopologyIconCatalog AddJsonPack(TopologyIconCatalog catalog, TextReader reader) #

Adds a JSON manifest icon pack read from a text reader to the catalog.

Parameters

catalog ChartForgeX.Topology.TopologyIconCatalog required
The target catalog.
reader System.IO.TextReader required
The source text reader.

Returns

TopologyIconCatalog The current catalog.
public static TopologyIconCatalog AddJsonPackFile(TopologyIconCatalog catalog, string path) #

Adds a JSON manifest icon pack read from a file to the catalog.

Parameters

catalog ChartForgeX.Topology.TopologyIconCatalog required
The target catalog.
path string required
The manifest file path.

Returns

TopologyIconCatalog The current catalog.
public static TopologyIconCatalog AddJsonPacksFromDirectory(TopologyIconCatalog catalog, string directoryPath, string searchPattern = "*.json", bool recursive = false) #

Adds all JSON icon-pack manifests from a directory to the catalog in deterministic file-name order.

Parameters

catalog ChartForgeX.Topology.TopologyIconCatalog required
The target catalog.
directoryPath string required
The source directory path.
searchPattern string = "*.json" optional
The file search pattern.
recursive bool = false optional
Whether child directories should be searched.

Returns

TopologyIconCatalog The current catalog.
FromJson 2 overloads
public static TopologyIconPack FromJson(string json) #

Creates a topology icon pack from a JSON manifest.

Parameters

json string required
The JSON manifest.

Returns

TopologyIconPack The imported topology icon pack.
public static TopologyIconPack FromJson(string json, string? manifestDirectory) #

Creates a topology icon pack from a JSON manifest and optionally resolves pack-local sidecar artwork.

Parameters

json string required
The JSON manifest.
manifestDirectory string? required
The manifest directory used to resolve sidecar artwork paths.

Returns

TopologyIconPack The imported topology icon pack.
LoadJsonCatalogFromDirectory 2 overloads
public static TopologyIconCatalogLoadResult LoadJsonCatalogFromDirectory(string directoryPath, string searchPattern = "*.json", bool recursive = false, bool includeBuiltInPacks = true) #

Loads a topology icon catalog from a directory and returns per-file diagnostics.

Parameters

directoryPath string required
The source directory path.
searchPattern string = "*.json" optional
The file search pattern.
recursive bool = false optional
Whether child directories should be searched.
includeBuiltInPacks bool = true optional
Whether the returned catalog should start with ChartForgeX built-in packs.

Returns

TopologyIconCatalogLoadResult The loaded catalog plus per-file diagnostics.
public static TopologyIconCatalogLoadResult LoadJsonCatalogFromDirectory(string directoryPath, TopologyIconCatalogLoadOptions? options) #

Loads a topology icon catalog from a directory and returns per-file diagnostics.

Parameters

directoryPath string required
The source directory path.
options ChartForgeX.Topology.TopologyIconCatalogLoadOptions? required
The load options.

Returns

TopologyIconCatalogLoadResult The loaded catalog plus per-file diagnostics.
LoadJsonManifest 3 overloads
public static TopologyIconPack LoadJsonManifest(string path) #

Loads a topology icon pack from a JSON manifest file.

Parameters

path string required
The manifest file path.

Returns

TopologyIconPack The imported topology icon pack.
public static TopologyIconPack LoadJsonManifest(TextReader reader) #

Loads a topology icon pack from a JSON manifest text reader.

Parameters

reader System.IO.TextReader required
The source text reader.

Returns

TopologyIconPack The imported topology icon pack.
public static TopologyIconPack LoadJsonManifest(TextReader reader, string manifestDirectory) #

Loads a topology icon pack from a JSON manifest text reader and resolves pack-local sidecar artwork.

Parameters

reader System.IO.TextReader required
The source text reader.
manifestDirectory string required
The manifest directory used to resolve sidecar artwork paths.

Returns

TopologyIconPack The imported topology icon pack.
public static IReadOnlyList<TopologyIconPackLoadResult> LoadJsonManifestResultsFromDirectory(string directoryPath, string searchPattern = "*.json", bool recursive = false) #

Loads all JSON icon-pack manifests from a directory and reports per-file success or failure.

Parameters

directoryPath string required
The source directory path.
searchPattern string = "*.json" optional
The file search pattern.
recursive bool = false optional
Whether child directories should be searched.

Returns

IReadOnlyList<TopologyIconPackLoadResult> Per-file load results in deterministic file-name order.
public static IReadOnlyList<TopologyIconPack> LoadJsonManifestsFromDirectory(string directoryPath, string searchPattern = "*.json", bool recursive = false) #

Loads all JSON icon-pack manifests from a directory in deterministic file-name order.

Parameters

directoryPath string required
The source directory path.
searchPattern string = "*.json" optional
The file search pattern.
recursive bool = false optional
Whether child directories should be searched.

Returns

IReadOnlyList<TopologyIconPack> The imported topology icon packs.
public static void SaveJsonManifest(TopologyIconPack pack, string path, bool indented = true) #

Saves a topology icon pack to a JSON manifest file.

Parameters

pack ChartForgeX.Topology.TopologyIconPack required
The icon pack.
path string required
The target manifest file path.
indented bool = true optional
Whether the manifest should be indented.
public static string ToJsonManifest(TopologyIconPack pack, bool indented = true) #

Serializes a topology icon pack as a deterministic JSON manifest.

Parameters

pack ChartForgeX.Topology.TopologyIconPack required
The icon pack.
indented bool = true optional
Whether the manifest should be indented.

Returns

string The JSON manifest.
public static void WriteJsonManifest(TopologyIconPack pack, TextWriter writer, bool indented = true) #

Writes a topology icon pack JSON manifest to a text writer.

Parameters

pack ChartForgeX.Topology.TopologyIconPack required
The icon pack.
writer System.IO.TextWriter required
The target text writer.
indented bool = true optional
Whether the manifest should be indented.

Fields

public const string Schema #

Gets the manifest schema identifier.

Value: chartforgex.topology.iconPack