Interface IMetadataFile
- Namespace
- Datamine.MineTrustConnector.Core.ConfigSchemas
- Assembly
- Datamine.MineTrustConnector.Core.dll
Abstraction over a mechanism for reading and writing config schema data to and from a file
public interface IMetadataFile
Methods
EnsureSchemaValue(string?, string?)
Ensures that the specified config value is present at the indicated location within the schema
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)
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
IEnumerable<string?> GetSchemaValues(string? key)
Parameters
key
string-
The key.
Returns
- IEnumerable<string>
-
The available values
Load(Stream)
Loads configuration data from the specified content stream.
void Load(Stream stream)
Parameters
stream
Stream-
The stream.
Load(string)
Loads configuration data from the specified file path.
void Load(string path)
Parameters
path
string-
The path.
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.
void Rebuild(IEnumerable<KeyValuePair<string?, string?>> keyValuePairs)
Parameters
keyValuePairs
IEnumerable<KeyValuePair<string, string>>-
The key value pairs.
Save(Stream)
Saves the configuration data to the specified content stream.
void Save(Stream stream)
Parameters
stream
Stream-
The stream.
Save(string)
Saves a configuration file to the specified file path.
void Save(string path)
Parameters
path
string-
The path.