Table of Contents

Method AddOrReplace

Namespace
LMKit.Data
Assembly
LM-Kit.NET.dll

AddOrReplace(MetadataCollection)

Adds or replaces metadata entries from the specified collection.

public void AddOrReplace(MetadataCollection collection)

Parameters

collection MetadataCollection

The collection containing metadata entries to add or replace. If null or empty, no action is taken.

Remarks

For each metadata entry in collection: if an entry with the same key exists in this collection, it is replaced; otherwise, it is added.

Exceptions

InvalidOperationException

The collection is read-only.

AddOrReplace(Metadata)

Adds a metadata entry to the collection, or replaces an existing entry with the same key.

public void AddOrReplace(Metadata metadata)

Parameters

metadata Metadata

The metadata entry to add or replace.

Remarks

If an entry with the same key already exists in the collection, it is replaced with the new entry. Otherwise, the new entry is added to the collection.

Exceptions

ArgumentNullException

metadata is null.

InvalidOperationException

The collection is read-only.