Files
FSI.BT.IR.Tools/Config.Net/IConfigStore.cs
Stephan Maier 647f938eee v1.2
2024-08-27 08:10:27 +02:00

36 lines
1.0 KiB
C#

using System;
namespace Config.Net
{
/// <summary>
/// Configuration store interface
/// </summary>
public interface IConfigStore : IDisposable
{
/// <summary>
/// Returns true if store supports read operation.
/// </summary>
bool CanRead { get; }
/// <summary>
/// Returns true if store supports write operation.
/// </summary>
bool CanWrite { get; }
/// <summary>
/// Reads a key from the store.
/// </summary>
/// <param name="key">Key name.</param>
/// <returns>If key exists in the store returns the value, othwise returns null.</returns>
string? Read(string key);
/// <summary>
/// Writes a key to the store.
/// </summary>
/// <param name="key">Key name</param>
/// <param name="value">Key value. Value of NULL usually means the key will be deleted, at least
/// this is the recomendation for the custom store implementers.</param>
void Write(string key, string? value);
}
}