API Reference
TopologyIconPackJson
Reads and writes dependency-free JSON manifests for topology icon packs.
Inheritance
- Object
- TopologyIconPackJson
Methods
public static TopologyIconCatalog AddJsonPack(TopologyIconCatalog catalog, String json) #TopologyIconCatalogAdds a JSON manifest icon pack to the catalog.
Parameters
- catalog ChartForgeX.Topology.TopologyIconCatalog
- The target catalog.
- json System.String
- The JSON manifest.
Returns
The current catalog.
public static TopologyIconCatalog AddJsonPack(TopologyIconCatalog catalog, TextReader reader) #TopologyIconCatalogAdds 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.
Returns
The current catalog.
public static TopologyIconCatalog AddJsonPackFile(TopologyIconCatalog catalog, String path) #TopologyIconCatalogAdds a JSON manifest icon pack read from a file to the catalog.
Parameters
- catalog ChartForgeX.Topology.TopologyIconCatalog
- The target catalog.
- path System.String
- The manifest file path.
Returns
The current catalog.
public static TopologyIconCatalog AddJsonPacksFromDirectory(TopologyIconCatalog catalog, String directoryPath, String searchPattern = "*.json", Boolean recursive = false) #TopologyIconCatalogAdds 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 System.String
- The source directory path.
- searchPattern System.String = "*.json"
- The file search pattern.
- recursive System.Boolean = false
- Whether child directories should be searched.
Returns
The current catalog.
public static TopologyIconPack FromJson(String json) #TopologyIconPackCreates a topology icon pack from a JSON manifest.
Parameters
- json System.String
- The JSON manifest.
Returns
The imported topology icon pack.
public static TopologyIconPack FromJson(String json, String? manifestDirectory) #TopologyIconPackCreates a topology icon pack from a JSON manifest and optionally resolves pack-local sidecar artwork.
Parameters
- json System.String
- The JSON manifest.
- manifestDirectory System.String?
- The manifest directory used to resolve sidecar artwork paths.
Returns
The imported topology icon pack.
public static TopologyIconCatalogLoadResult LoadJsonCatalogFromDirectory(String directoryPath, String searchPattern = "*.json", Boolean recursive = false, Boolean includeBuiltInPacks = true) #TopologyIconCatalogLoadResultLoads a topology icon catalog from a directory and returns per-file diagnostics.
Parameters
- directoryPath System.String
- The source directory path.
- searchPattern System.String = "*.json"
- The file search pattern.
- recursive System.Boolean = false
- Whether child directories should be searched.
- includeBuiltInPacks System.Boolean = true
- Whether the returned catalog should start with ChartForgeX built-in packs.
Returns
The loaded catalog plus per-file diagnostics.
public static TopologyIconCatalogLoadResult LoadJsonCatalogFromDirectory(String directoryPath, TopologyIconCatalogLoadOptions? options) #TopologyIconCatalogLoadResultLoads a topology icon catalog from a directory and returns per-file diagnostics.
Parameters
- directoryPath System.String
- The source directory path.
- options ChartForgeX.Topology.TopologyIconCatalogLoadOptions?
- The load options.
Returns
The loaded catalog plus per-file diagnostics.
public static TopologyIconPack LoadJsonManifest(String path) #TopologyIconPackLoads a topology icon pack from a JSON manifest file.
Parameters
- path System.String
- The manifest file path.
Returns
The imported topology icon pack.
public static TopologyIconPack LoadJsonManifest(TextReader reader) #TopologyIconPackLoads a topology icon pack from a JSON manifest text reader.
Parameters
- reader System.IO.TextReader
- The source text reader.
Returns
The imported topology icon pack.
public static TopologyIconPack LoadJsonManifest(TextReader reader, String manifestDirectory) #TopologyIconPackLoads 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 System.String
- The manifest directory used to resolve sidecar artwork paths.
Returns
The imported topology icon pack.
public static IReadOnlyList<TopologyIconPackLoadResult> LoadJsonManifestResultsFromDirectory(String directoryPath, String searchPattern = "*.json", Boolean recursive = false) #IReadOnlyList<TopologyIconPackLoadResult>Loads all JSON icon-pack manifests from a directory and reports per-file success or failure.
Parameters
- directoryPath System.String
- The source directory path.
- searchPattern System.String = "*.json"
- The file search pattern.
- recursive System.Boolean = false
- Whether child directories should be searched.
Returns
Per-file load results in deterministic file-name order.
public static IReadOnlyList<TopologyIconPack> LoadJsonManifestsFromDirectory(String directoryPath, String searchPattern = "*.json", Boolean recursive = false) #IReadOnlyList<TopologyIconPack>Loads all JSON icon-pack manifests from a directory in deterministic file-name order.
Parameters
- directoryPath System.String
- The source directory path.
- searchPattern System.String = "*.json"
- The file search pattern.
- recursive System.Boolean = false
- Whether child directories should be searched.
Returns
The imported topology icon packs.
public static Void SaveJsonManifest(TopologyIconPack pack, String path, Boolean indented = true) #VoidSaves a topology icon pack to a JSON manifest file.
Parameters
- pack ChartForgeX.Topology.TopologyIconPack
- The icon pack.
- path System.String
- The target manifest file path.
- indented System.Boolean = true
- Whether the manifest should be indented.
public static String ToJsonManifest(TopologyIconPack pack, Boolean indented = true) #StringSerializes a topology icon pack as a deterministic JSON manifest.
Parameters
- pack ChartForgeX.Topology.TopologyIconPack
- The icon pack.
- indented System.Boolean = true
- Whether the manifest should be indented.
Returns
The JSON manifest.
public static Void WriteJsonManifest(TopologyIconPack pack, TextWriter writer, Boolean indented = true) #VoidWrites 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 System.Boolean = true
- Whether the manifest should be indented.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Fields
public const String Schema #Gets the manifest schema identifier.
chartforgex.topology.iconPack