Method Contains
Contains(Metadata)
Determines whether the metadata collection contains the specified metadata entry.
public bool Contains(Metadata item)
Parameters
itemMetadataThe metadata entry to locate in the collection.
Returns
- bool
trueifitemis found in the collection; otherwise,false.
Contains(MetadataCollection)
Determines whether the current collection contains all keys from the specified metadata collection.
public bool Contains(MetadataCollection metadata)
Parameters
metadataMetadataCollectionThe collection of metadata entries whose keys to locate in the current collection.
Returns
- bool
trueif all keys in the specified metadata collection are present in the current collection; otherwise,false.
Remarks
This method checks for key presence only; it does not compare values.
Use Contains(MetadataCollection, bool) with compareValues: true to also compare values.
Contains(MetadataCollection, bool)
Determines whether the current collection contains all keys from the specified metadata collection, optionally comparing values as well.
public bool Contains(MetadataCollection metadata, bool compareValues)
Parameters
metadataMetadataCollectionThe collection of metadata entries to locate in the current collection.
compareValuesboolIf
true, both keys and values must match; iffalse, only keys are compared.
Returns
- bool
trueif all entries in the specified metadata collection are present in the current collection (with matching values ifcompareValuesistrue); otherwise,false.