Skip to content
ChartForgeX
Class

TopologyIconPack

ChartForgeX.Topology

Namespace
ChartForgeX.Topology
Assembly
ChartForgeX
Modifiers
sealed
Attributes
Fluent

Represents a named set of reusable topology icons.

Inheritance

  • object
  • TopologyIconPack

Usage

Explore 55 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 26

Constructors

public TopologyIconPack(string id, string label, string? vendor = null, string? version = null, bool isBuiltIn = false) #

Initializes a topology icon pack.

Parameters

id string required
label string required
vendor string? = null optional
version string? = null optional
isBuiltIn bool = false optional

Methods

AddIcon 2 overloads
public TopologyIconPack AddIcon(string id, string label, TopologyNodeKind nodeKind, TopologyIconShape shape = Auto, string? symbol = null, ChartColor? color = null, string? category = null, TopologyNodeDisplayMode? displayMode = null) #

Adds an icon definition to the pack.

Parameters

id string required
label string required
nodeKind ChartForgeX.Topology.TopologyNodeKind required
shape ChartForgeX.Topology.TopologyIconShape = Auto optional
symbol string? = null optional
color ChartForgeX.Primitives.ChartColor? = null optional
category string? = null optional
displayMode ChartForgeX.Topology.TopologyNodeDisplayMode? = null optional
public TopologyIconPack AddIcon(TopologyIconDefinition icon) #

Adds a pre-built icon definition to the pack.

Parameters

icon ChartForgeX.Topology.TopologyIconDefinition required
public TopologyIconPack AddIconTags(string iconId, params string[] tags) #

Adds search tags to an icon inside this pack.

Parameters

iconId string required
tags string[] required
public TopologyIconPack AddTags(params string[] tags) #

Adds pack-level search tags and returns the current pack.

Parameters

tags string[] required

Properties

public string Id { get; set; } #

Gets or sets the stable pack id.

public string Label { get; set; } #

Gets or sets the display label.

public string? Vendor { get; set; } #

Gets or sets the optional pack vendor.

public string? Version { get; set; } #

Gets or sets the optional pack version.

public bool IsBuiltIn { get; set; } #

Gets whether the pack is supplied by ChartForgeX.

public IReadOnlyList<TopologyIconDefinition> Icons { get; } #

Gets icons in the pack.

public Dictionary<string, string> Metadata { get; } #

Gets arbitrary metadata for host-side pickers and vendor adapters.

public List<string> Tags { get; } #

Gets search tags for host-side pickers.

Extension Methods

public static TopologyIconPack BuiltIn(TopologyIconPack topologyIconPack, bool value = true) #

Sets TopologyIconPack.IsBuiltIn: Gets whether the pack is supplied by ChartForgeX.

Parameters

topologyIconPack ChartForgeX.Topology.TopologyIconPack required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TopologyIconPack The same instance.

Examples

// C# initializer or property          // C# fluent
topologyIconPack.IsBuiltIn = value;    topologyIconPack.BuiltIn(value);
public static TopologyIconPack Id(TopologyIconPack topologyIconPack, string value) #

Sets TopologyIconPack.Id: Gets or sets the stable pack id.

Parameters

topologyIconPack ChartForgeX.Topology.TopologyIconPack required
The instance.
value string required
The value.

Returns

TopologyIconPack The same instance.

Examples

// C# initializer or property    // C# fluent
topologyIconPack.Id = value;     topologyIconPack.Id(value);
public static TopologyIconPack Label(TopologyIconPack topologyIconPack, string value) #

Sets TopologyIconPack.Label: Gets or sets the display label.

Parameters

topologyIconPack ChartForgeX.Topology.TopologyIconPack required
The instance.
value string required
The value.

Returns

TopologyIconPack The same instance.

Examples

// C# initializer or property      // C# fluent
topologyIconPack.Label = value;    topologyIconPack.Label(value);
public static TopologyIconPack Metadata(TopologyIconPack topologyIconPack, string key, string value) #

Adds or replaces pack metadata and returns the current pack.

Parameters

topologyIconPack ChartForgeX.Topology.TopologyIconPack required
key string required
value string required
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 TopologyIconPack Tag(TopologyIconPack topologyIconPack, string item) #

Adds an item to TopologyIconPack.Tags: Gets search tags for host-side pickers.

Parameters

topologyIconPack ChartForgeX.Topology.TopologyIconPack required
The instance.
item string required
The item.

Returns

TopologyIconPack The same instance.
public static TopologyIconPack Tags(TopologyIconPack topologyIconPack, IEnumerable<string> items) #

Adds items to TopologyIconPack.Tags: Gets search tags for host-side pickers.

Parameters

topologyIconPack ChartForgeX.Topology.TopologyIconPack required
The instance.
items System.Collections.Generic.IEnumerable<string> required
The items, in order.

Returns

TopologyIconPack The same instance.
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 TopologyIconPackValidationResult Validate(TopologyIconPack pack) #

Validates a topology icon pack for authoring issues and renderer compatibility.

Parameters

pack ChartForgeX.Topology.TopologyIconPack required
The icon pack to validate.

Returns

TopologyIconPackValidationResult Validation diagnostics for the pack.
public static TopologyIconPack Vendor(TopologyIconPack topologyIconPack, string? value) #

Sets TopologyIconPack.Vendor: Gets or sets the optional pack vendor.

Parameters

topologyIconPack ChartForgeX.Topology.TopologyIconPack required
The instance.
value string? required
The value.

Returns

TopologyIconPack The same instance.

Examples

// C# initializer or property       // C# fluent
topologyIconPack.Vendor = value;    topologyIconPack.Vendor(value);
public static TopologyIconPack Version(TopologyIconPack topologyIconPack, string? value) #

Sets TopologyIconPack.Version: Gets or sets the optional pack version.

Parameters

topologyIconPack ChartForgeX.Topology.TopologyIconPack required
The instance.
value string? required
The value.

Returns

TopologyIconPack The same instance.

Examples

// C# initializer or property        // C# fluent
topologyIconPack.Version = value;    topologyIconPack.Version(value);
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.