Class TextMetadataFile
- Namespace
- Datamine.MineTrustConnector.Core.ConfigSchemas
- Assembly
- Datamine.MineTrustConnector.Core.dll
Implementation of IMetadataFile which stores simple key value pairs within a regular text file using the following format: %KEY1%=%VALUE1% %KEY2%=%VALUE2% ...
public class TextMetadataFile : MetadataFileBase, IMetadataFile
- Inheritance
-
TextMetadataFile
- Implements
- Inherited Members
Methods
EnsureSchemaValue(string?, string?)
Ensures that the specified config value is present at the indicated location within the schema
public override void EnsureSchemaValue(string? key, string? value)
Parameters
Flatten()
Flattens the backing config data into an enumeration of key value pairs, where the key of each value is its hierarchical location within the schema (in path format)
public override IEnumerable<KeyValuePair<string?, string?>> Flatten()
Returns
- IEnumerable<KeyValuePair<string, string>>
-
The flattened config schema
GetSchemaValues(string?)
Gets the available config values at the indicated location within the schema
public override IEnumerable<string?> GetSchemaValues(string? key)
Parameters
key
string-
The key.
Returns
- IEnumerable<string>
-
The available values
Rebuild(IEnumerable<KeyValuePair<string?, string?>>)
Rebuilds this instance in its entirety from the specified set of config key value pairs, where the key of each value is its hierarchical location within the schema (in path format). All existing config data stored within this instance is removed.
public override void Rebuild(IEnumerable<KeyValuePair<string?, string?>> keyValuePairs)
Parameters
keyValuePairs
IEnumerable<KeyValuePair<string, string>>-
The key value pairs.