Method Add
Add(Metadata)
Adds a metadata entry to the collection.
public void Add(Metadata metadata)
Parameters
metadata
MetadataThe metadata to add. It must not already exist in the collection.
Exceptions
- ArgumentNullException
Thrown if the
metadata
is null.- ArgumentException
Thrown if a metadata entry with the same key already exists in the collection.
Add(KeyValuePair<string, string>)
Adds a metadata entry to the collection by specifying a key and a value.
public void Add(KeyValuePair<string, string> item)
Parameters
item
KeyValuePair<string, string>The KeyValuePair representing the key and value to add.
Exceptions
- ArgumentException
Thrown if a metadata entry with the same key already exists in the collection.
Add(MetadataCollection)
Adds all metadata entries from the specified MetadataCollection to the current collection.
public void Add(MetadataCollection collection)
Parameters
collection
MetadataCollectionThe MetadataCollection whose metadata entries are to be added to the current collection.
Exceptions
- ArgumentException
Thrown if any metadata entry in the provided collection has a key that already exists in the current collection.
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
Exceptions
- ArgumentException
Thrown if a metadata entry with the same key already exists in the collection.