Interface IMetaDataContainer
Common interface implemented by objects that have the capability to hold metadata in the form of string key/value pairs.
Namespace: Sdl.FileTypeSupport.Framework.NativeApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface IMetaDataContainer
Remarks
Similar to a dictionary<String, String>.
Enumerate existing values through the Meta
Properties
HasMetaData
True
if there is any metadata in the container
Declaration
bool HasMetaData { get; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Similar to a dictionary<String, String>.
Enumerate existing values through the Meta
MetaData
Enumerator for the metadata key/value pairs.
Declaration
IEnumerable<KeyValuePair<string, string>> MetaData { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Key |
Remarks
The returned key value pair should not be modified.
Use Set
MetaDataCount
The number of meta data key/value pairs in the container
Declaration
int MetaDataCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Similar to a dictionary<String, String>.
Enumerate existing values through the Meta
Methods
ClearMetaData()
Removes all key/value pairs from the meta data collection.
Declaration
void ClearMetaData()
Remarks
Similar to a dictionary<String, String>.
Enumerate existing values through the Meta
GetMetaData(String)
Returns the metadata value associated with the specified key,
or null
if no such key exists in the collection.
Declaration
string GetMetaData(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | Must not be empty or |
Returns
Type | Description |
---|---|
String | The corresponding value, or |
Remarks
Similar to a dictionary<String, String>.
Enumerate existing values through the Meta
MetaDataContainsKey(String)
True
if a metadata value with the specified key exists
Declaration
bool MetaDataContainsKey(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | Must not be empty or |
Returns
Type | Description |
---|---|
Boolean |
Remarks
Similar to a dictionary<String, String>.
Enumerate existing values through the Meta
RemoveMetaData(String)
Removes the metadata key/value pair with the specified key from the collection. No changes are made if the collection does not contain such a key.
Declaration
bool RemoveMetaData(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | Must not be |
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
Similar to a dictionary<String, String>.
Enumerate existing values through the Meta
SetMetaData(String, String)
Sets the value of the specified metadata key.
If the key already exists in the collection, its value gets overwritten.
Declaration
void SetMetaData(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
String | key | Must not be empty or |
String | value | Must not be |
Remarks
Similar to a dictionary<String, String>.
Enumerate existing values through the Meta