TopologyIconPackJson
ChartForgeX.Topology
Reads and writes dependency-free JSON manifests for topology icon packs.
Inheritance
- object
- TopologyIconPackJson
Methods
public static TopologyIconCatalog AddJsonPack(TopologyIconCatalog catalog, string json) #Adds a JSON manifest icon pack to the catalog.
Parameters
- catalog ChartForgeX.Topology.TopologyIconCatalog
- The target catalog.
- json string
- The JSON manifest.
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
- The target catalog.
- reader System.IO.TextReader
- The source text reader.
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
- The target catalog.
- path string
- The manifest file path.
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
- The target catalog.
- directoryPath string
- The source directory path.
- searchPattern string = "*.json"
- The file search pattern.
- recursive bool = false
- Whether child directories should be searched.
public static TopologyIconPack FromJson(string json) #Creates a topology icon pack from a JSON manifest.
Parameters
- json string
- The JSON manifest.
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
- The JSON manifest.
- manifestDirectory string?
- The manifest directory used to resolve sidecar artwork paths.
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
- The source directory path.
- searchPattern string = "*.json"
- The file search pattern.
- recursive bool = false
- Whether child directories should be searched.
- includeBuiltInPacks bool = true
- Whether the returned catalog should start with ChartForgeX built-in packs.
public static TopologyIconCatalogLoadResult LoadJsonCatalogFromDirectory(string directoryPath, TopologyIconCatalogLoadOptions? options) #Loads a topology icon catalog from a directory and returns per-file diagnostics.
Parameters
- directoryPath string
- The source directory path.
- options ChartForgeX.Topology.TopologyIconCatalogLoadOptions?
- The load options.
public static TopologyIconPack LoadJsonManifest(string path) #Loads a topology icon pack from a JSON manifest file.
Parameters
- path string
- The manifest file path.
public static TopologyIconPack LoadJsonManifest(TextReader reader) #Loads a topology icon pack from a JSON manifest text reader.
Parameters
- reader System.IO.TextReader
- The source text reader.
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
- The source text reader.
- manifestDirectory string
- The manifest directory used to resolve sidecar artwork paths.
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
- The source directory path.
- searchPattern string = "*.json"
- The file search pattern.
- recursive bool = false
- 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
- The source directory path.
- searchPattern string = "*.json"
- The file search pattern.
- recursive bool = false
- Whether child directories should be searched.
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
- The icon pack.
- path string
- The target manifest file path.
- indented bool = true
- 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
- The icon pack.
- indented bool = true
- 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
- The icon pack.
- writer System.IO.TextWriter
- The target text writer.
- indented bool = true
- Whether the manifest should be indented.
Inherited Methods
Fields
public const string Schema #Gets the manifest schema identifier.
chartforgex.topology.iconPack