Table of Contents

Method Add

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

Add(Metadata)

Adds a metadata entry to the collection.

public void Add(Metadata metadata)

Parameters

metadata Metadata

The metadata entry to add.

Exceptions

ArgumentNullException

metadata is null.

ArgumentException

A metadata entry with the same key already exists in the collection.

InvalidOperationException

The collection is read-only.

Add(KeyValuePair<string, string>)

Adds a metadata entry to the collection using a key-value pair.

public void Add(KeyValuePair<string, string> item)

Parameters

item KeyValuePair<string, string>

A KeyValuePair<TKey, TValue> representing the key and value to add.

Exceptions

ArgumentException

A metadata entry with the same key already exists in the collection.

InvalidOperationException

The collection is read-only.

Add(MetadataCollection)

Adds all metadata entries from another MetadataCollection to this collection.

public void Add(MetadataCollection collection)

Parameters

collection MetadataCollection

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

Exceptions

ArgumentException

A metadata entry in collection has a key that already exists in this collection.

InvalidOperationException

The collection is read-only.

Add(string, string)

Adds a metadata entry to the collection by specifying a key and a value.

public void Add(string key, string value)

Parameters

key string

The key of the metadata entry to add.

value string

The value of the metadata entry to add.

Exceptions

ArgumentException

A metadata entry with the same key already exists in the collection.

InvalidOperationException

The collection is read-only.