# TopologyIconPack

Represents a named set of reusable topology icons.

 Class  

`ChartForgeX.Topology`

**Namespace**

`ChartForgeX.Topology`

**Assembly**

`ChartForgeX`

**Source**

[TopologyIcons.cs:168](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L168)

**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.

### Returned or exposed by 29

- Property [TopologyIconCatalog.Packs](/api/chartforgex-topology-topologyiconcatalog/#property-packs)
- Property [TopologyIconCatalogItem.Pack](/api/chartforgex-topology-topologyiconcatalogitem/#property-pack)
- Property [TopologyIconCatalogLoadResult.LoadedPacks](/api/chartforgex-topology-topologyiconcatalogloadresult/#property-loadedpacks)
- Extension method [TopologyIconPack.BuiltIn](/api/chartforgex-topology-topologyiconpack/#extension-builtin-chartforgex-topology-topologyiconpack-boolean)
- Extension method [TopologyIconPack.Id](/api/chartforgex-topology-topologyiconpack/#extension-id-chartforgex-topology-topologyiconpack-string)
- Extension method [TopologyIconPack.Label](/api/chartforgex-topology-topologyiconpack/#extension-label-chartforgex-topology-topologyiconpack-string)
- Extension method [TopologyIconPack.Metadata](/api/chartforgex-topology-topologyiconpack/#extension-metadata-chartforgex-topology-topologyiconpack-string-string)
- Extension method [TopologyIconPack.Tag](/api/chartforgex-topology-topologyiconpack/#extension-tag-chartforgex-topology-topologyiconpack-string)
- Extension method [TopologyIconPack.Tags](/api/chartforgex-topology-topologyiconpack/#extension-tags-chartforgex-topology-topologyiconpack-collections-generic-ienumerable-system-string)
- Extension method [TopologyIconPack.Vendor](/api/chartforgex-topology-topologyiconpack/#extension-vendor-chartforgex-topology-topologyiconpack-string)
- Extension method [TopologyIconPack.Version](/api/chartforgex-topology-topologyiconpack/#extension-version-chartforgex-topology-topologyiconpack-string)
- Method [TopologyIconPack.AddIcon](/api/chartforgex-topology-topologyiconpack/#method-addicon-string-string-chartforgex-topology-topologynodekind-chartforgex-topology-topologyiconshape-string-nullable-chartforgex-primitives-chartcolor-string-nullable-chartforgex-topology-topologynodedisplaymode)
- Method [TopologyIconPack.AddIconTags](/api/chartforgex-topology-topologyiconpack/#method-addicontags-string-string)
- Method [TopologyIconPack.AddTags](/api/chartforgex-topology-topologyiconpack/#method-addtags-string)
- Method [TopologyIconPackFluent.BuiltIn](/api/chartforgex-topology-topologyiconpackfluent/#method-builtin-chartforgex-topology-topologyiconpack-boolean)
- Method [TopologyIconPackFluent.Id](/api/chartforgex-topology-topologyiconpackfluent/#method-id-chartforgex-topology-topologyiconpack-string)
- Method [TopologyIconPackFluent.Label](/api/chartforgex-topology-topologyiconpackfluent/#method-label-chartforgex-topology-topologyiconpack-string)
- Method [TopologyIconPackFluent.Metadata](/api/chartforgex-topology-topologyiconpackfluent/#method-metadata-chartforgex-topology-topologyiconpack-string-string)
- Method [TopologyIconPackFluent.Tag](/api/chartforgex-topology-topologyiconpackfluent/#method-tag-chartforgex-topology-topologyiconpack-string)
- Method [TopologyIconPackFluent.Tags](/api/chartforgex-topology-topologyiconpackfluent/#method-tags-chartforgex-topology-topologyiconpack-collections-generic-ienumerable-system-string)
- Method [TopologyIconPackFluent.Vendor](/api/chartforgex-topology-topologyiconpackfluent/#method-vendor-chartforgex-topology-topologyiconpack-string)
- Method [TopologyIconPackFluent.Version](/api/chartforgex-topology-topologyiconpackfluent/#method-version-chartforgex-topology-topologyiconpack-string)
- Method [TopologyIconPackJson.FromJson](/api/chartforgex-topology-topologyiconpackjson/#method-fromjson-string)
- Method [TopologyIconPackJson.LoadJsonManifest](/api/chartforgex-topology-topologyiconpackjson/#method-loadjsonmanifest-string)
- Method [TopologyIconPackJson.LoadJsonManifestsFromDirectory](/api/chartforgex-topology-topologyiconpackjson/#method-loadjsonmanifestsfromdirectory-string-string-boolean)
- Property [TopologyIconPackLoadResult.Pack](/api/chartforgex-topology-topologyiconpackloadresult/#property-pack)
- Property [TopologyIconPackSummary.Pack](/api/chartforgex-topology-topologyiconpacksummary/#property-pack)
- Property [TopologyIconPackValidationResult.Pack](/api/chartforgex-topology-topologyiconpackvalidationresult/#property-pack)
- Property [TopologyIconSvgPackImportResult.Pack](/api/chartforgex-topology-topologyiconsvgpackimportresult/#property-pack)

### Accepted by parameters 26

- Method [TopologyIconCatalog.AddOrReplacePack](/api/chartforgex-topology-topologyiconcatalog/#method-addorreplacepack-chartforgex-topology-topologyiconpack) parameter `pack`
- Method [TopologyIconCatalog.AddPack](/api/chartforgex-topology-topologyiconcatalog/#method-addpack-chartforgex-topology-topologyiconpack) parameter `pack`
- Extension method [TopologyIconPack.BuiltIn](/api/chartforgex-topology-topologyiconpack/#extension-builtin-chartforgex-topology-topologyiconpack-boolean) parameter `topologyIconPack`
- Extension method [TopologyIconPack.Id](/api/chartforgex-topology-topologyiconpack/#extension-id-chartforgex-topology-topologyiconpack-string) parameter `topologyIconPack`
- Extension method [TopologyIconPack.Label](/api/chartforgex-topology-topologyiconpack/#extension-label-chartforgex-topology-topologyiconpack-string) parameter `topologyIconPack`
- Extension method [TopologyIconPack.Metadata](/api/chartforgex-topology-topologyiconpack/#extension-metadata-chartforgex-topology-topologyiconpack-string-string) parameter `topologyIconPack`
- Extension method [TopologyIconPack.SaveJsonManifest](/api/chartforgex-topology-topologyiconpack/#extension-savejsonmanifest-chartforgex-topology-topologyiconpack-string-boolean) parameter `pack`
- Extension method [TopologyIconPack.Tag](/api/chartforgex-topology-topologyiconpack/#extension-tag-chartforgex-topology-topologyiconpack-string) parameter `topologyIconPack`
- Extension method [TopologyIconPack.Tags](/api/chartforgex-topology-topologyiconpack/#extension-tags-chartforgex-topology-topologyiconpack-collections-generic-ienumerable-system-string) parameter `topologyIconPack`
- Extension method [TopologyIconPack.ToJsonManifest](/api/chartforgex-topology-topologyiconpack/#extension-tojsonmanifest-chartforgex-topology-topologyiconpack-boolean) parameter `pack`
- Extension method [TopologyIconPack.Validate](/api/chartforgex-topology-topologyiconpack/#extension-validate-chartforgex-topology-topologyiconpack) parameter `pack`
- Extension method [TopologyIconPack.Vendor](/api/chartforgex-topology-topologyiconpack/#extension-vendor-chartforgex-topology-topologyiconpack-string) parameter `topologyIconPack`
- Extension method [TopologyIconPack.Version](/api/chartforgex-topology-topologyiconpack/#extension-version-chartforgex-topology-topologyiconpack-string) parameter `topologyIconPack`
- Extension method [TopologyIconPack.WriteJsonManifest](/api/chartforgex-topology-topologyiconpack/#extension-writejsonmanifest-chartforgex-topology-topologyiconpack-io-textwriter-boolean) parameter `pack`
- Method [TopologyIconPackFluent.BuiltIn](/api/chartforgex-topology-topologyiconpackfluent/#method-builtin-chartforgex-topology-topologyiconpack-boolean) parameter `topologyIconPack`
- Method [TopologyIconPackFluent.Id](/api/chartforgex-topology-topologyiconpackfluent/#method-id-chartforgex-topology-topologyiconpack-string) parameter `topologyIconPack`
- Method [TopologyIconPackFluent.Label](/api/chartforgex-topology-topologyiconpackfluent/#method-label-chartforgex-topology-topologyiconpack-string) parameter `topologyIconPack`
- Method [TopologyIconPackFluent.Metadata](/api/chartforgex-topology-topologyiconpackfluent/#method-metadata-chartforgex-topology-topologyiconpack-string-string) parameter `topologyIconPack`
- Method [TopologyIconPackFluent.Tag](/api/chartforgex-topology-topologyiconpackfluent/#method-tag-chartforgex-topology-topologyiconpack-string) parameter `topologyIconPack`
- Method [TopologyIconPackFluent.Tags](/api/chartforgex-topology-topologyiconpackfluent/#method-tags-chartforgex-topology-topologyiconpack-collections-generic-ienumerable-system-string) parameter `topologyIconPack`
- Method [TopologyIconPackFluent.Vendor](/api/chartforgex-topology-topologyiconpackfluent/#method-vendor-chartforgex-topology-topologyiconpack-string) parameter `topologyIconPack`
- Method [TopologyIconPackFluent.Version](/api/chartforgex-topology-topologyiconpackfluent/#method-version-chartforgex-topology-topologyiconpack-string) parameter `topologyIconPack`
- Method [TopologyIconPackJson.SaveJsonManifest](/api/chartforgex-topology-topologyiconpackjson/#method-savejsonmanifest-chartforgex-topology-topologyiconpack-string-boolean) parameter `pack`
- Method [TopologyIconPackJson.ToJsonManifest](/api/chartforgex-topology-topologyiconpackjson/#method-tojsonmanifest-chartforgex-topology-topologyiconpack-boolean) parameter `pack`
- Method [TopologyIconPackJson.WriteJsonManifest](/api/chartforgex-topology-topologyiconpackjson/#method-writejsonmanifest-chartforgex-topology-topologyiconpack-io-textwriter-boolean) parameter `pack`
- Method [TopologyIconValidationExtensions.Validate](/api/chartforgex-topology-topologyiconvalidationextensions/#method-validate-chartforgex-topology-topologyiconpack) parameter `pack`

 Filter members   

    Show inherited   

 

## Constructors

 `public TopologyIconPack(string id, string label, string? vendor = null, string? version = null, bool isBuiltIn = false)` [#](#constructor-ctor-string-string-string-string-boolean) 

[TopologyIcons.cs:168](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L168)

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)` [#](#member-d45daafa405590fceb5afdf7) 

[TopologyIcons.cs:211](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L211)

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**

Returns

 `TopologyIconPack` 

 `public TopologyIconPack AddIcon(TopologyIconDefinition icon)` [#](#method-addicon-chartforgex-topology-topologyicondefinition) 

[TopologyIcons.cs:224](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L224)

Adds a pre-built icon definition to the pack.

Parameters

**icon ChartForgeX.Topology.TopologyIconDefinition required**

Returns

 `TopologyIconPack` 

 `public TopologyIconPack AddIconTags(string iconId, params string[] tags)` [#](#method-addicontags-string-string) 

[TopologyIcons.cs:259](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L259)

Adds search tags to an icon inside this pack.

Parameters

**iconId string required**

**tags string[] required**

Returns

 `TopologyIconPack` 

 `public TopologyIconPack AddTags(params string[] tags)` [#](#method-addtags-string) 

[TopologyIcons.cs:251](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L251)

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

Parameters

**tags string[] required**

Returns

 `TopologyIconPack` 

## Inherited Methods

 `public virtual bool Equals(object? obj)` [#](#method-equals-object) 

Inherited from object

Parameters

**obj object? required**

Returns

 `bool` 

 `public virtual int GetHashCode()` [#](#method-gethashcode) 

Inherited from object

Returns

 `int` 

 `public Type GetType()` [#](#method-gettype) 

Inherited from object

Returns

 `Type` 

 `public virtual string? ToString()` [#](#method-tostring) 

Inherited from object

Returns

 `string?` 

## Properties

 `public string Id { get; set; }` [#](#property-id) 

[TopologyIcons.cs:184](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L184)

Gets or sets the stable pack id.

 `public string Label { get; set; }` [#](#property-label) 

[TopologyIcons.cs:187](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L187)

Gets or sets the display label.

 `public string? Vendor { get; set; }` [#](#property-vendor) 

[TopologyIcons.cs:190](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L190)

Gets or sets the optional pack vendor.

 `public string? Version { get; set; }` [#](#property-version) 

[TopologyIcons.cs:193](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L193)

Gets or sets the optional pack version.

 `public bool IsBuiltIn { get; set; }` [#](#property-isbuiltin) 

[TopologyIcons.cs:196](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L196)

Gets whether the pack is supplied by ChartForgeX.

 `public IReadOnlyList<TopologyIconDefinition> Icons { get; }` [#](#property-icons) 

[TopologyIcons.cs:199](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L199)

Gets icons in the pack.

 `public Dictionary<string, string> Metadata { get; }` [#](#property-metadata) 

[TopologyIcons.cs:202](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L202)

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

 `public List<string> Tags { get; }` [#](#property-tags) 

[TopologyIcons.cs:205](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIcons.cs#L205)

Gets search tags for host-side pickers.

## Extension Methods

 `public static TopologyIconPack BuiltIn(TopologyIconPack topologyIconPack, bool value = true)` [#](#extension-builtin-chartforgex-topology-topologyiconpack-boolean) 

Sets [TopologyIconPack.IsBuiltIn](/api/chartforgex-topology-topologyiconpack/): 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

```csharp
// C# initializer or property          // C# fluent
topologyIconPack.IsBuiltIn = value;    topologyIconPack.BuiltIn(value);
```

 `public static TopologyIconPack Id(TopologyIconPack topologyIconPack, string value)` [#](#extension-id-chartforgex-topology-topologyiconpack-string) 

Sets [TopologyIconPack.Id](/api/chartforgex-topology-topologyiconpack/): 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

```csharp
// C# initializer or property    // C# fluent
topologyIconPack.Id = value;     topologyIconPack.Id(value);
```

 `public static TopologyIconPack Label(TopologyIconPack topologyIconPack, string value)` [#](#extension-label-chartforgex-topology-topologyiconpack-string) 

Sets [TopologyIconPack.Label](/api/chartforgex-topology-topologyiconpack/): 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

```csharp
// C# initializer or property      // C# fluent
topologyIconPack.Label = value;    topologyIconPack.Label(value);
```

 `public static TopologyIconPack Metadata(TopologyIconPack topologyIconPack, string key, string value)` [#](#extension-metadata-chartforgex-topology-topologyiconpack-string-string) 

[TopologyIconPack.Fluent.cs:14](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIconPack.Fluent.cs#L14)

Adds or replaces pack metadata and returns the current pack.

Parameters

**topologyIconPack ChartForgeX.Topology.TopologyIconPack required**

**key string required**

**value string required**

Returns

 `TopologyIconPack` 

 `public static void SaveJsonManifest(TopologyIconPack pack, string path, bool indented = true)` [#](#extension-savejsonmanifest-chartforgex-topology-topologyiconpack-string-boolean) 

[TopologyIconPackJson.cs:279](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIconPackJson.cs#L279)

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)` [#](#extension-tag-chartforgex-topology-topologyiconpack-string) 

Adds an item to [TopologyIconPack.Tags](/api/chartforgex-topology-topologyiconpack/): 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)` [#](#extension-tags-chartforgex-topology-topologyiconpack-collections-generic-ienumerable-system-string) 

Adds items to [TopologyIconPack.Tags](/api/chartforgex-topology-topologyiconpack/): 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)` [#](#extension-tojsonmanifest-chartforgex-topology-topologyiconpack-boolean) 

[TopologyIconPackJson.cs:238](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIconPackJson.cs#L238)

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)` [#](#extension-validate-chartforgex-topology-topologyiconpack) 

[TopologyIconValidation.cs:103](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIconValidation.cs#L103)

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)` [#](#extension-vendor-chartforgex-topology-topologyiconpack-string) 

Sets [TopologyIconPack.Vendor](/api/chartforgex-topology-topologyiconpack/): 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

```csharp
// C# initializer or property       // C# fluent
topologyIconPack.Vendor = value;    topologyIconPack.Vendor(value);
```

 `public static TopologyIconPack Version(TopologyIconPack topologyIconPack, string? value)` [#](#extension-version-chartforgex-topology-topologyiconpack-string) 

Sets [TopologyIconPack.Version](/api/chartforgex-topology-topologyiconpack/): 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

```csharp
// C# initializer or property        // C# fluent
topologyIconPack.Version = value;    topologyIconPack.Version(value);
```

 `public static void WriteJsonManifest(TopologyIconPack pack, TextWriter writer, bool indented = true)` [#](#extension-writejsonmanifest-chartforgex-topology-topologyiconpack-io-textwriter-boolean) 

[TopologyIconPackJson.cs:291](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Topology/TopologyIconPackJson.cs#L291)

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.

<!-- PowerForge markdown artifact sha256:7EFFB532486D3AB9C4A1BFFB89F79FFAAC9004F561AE6CF1C6F233DC0332D822 -->
