|
using System.Collections.Generic;
namespace i3Quest.Configuration.Core
{
/// <summary>
/// Represents an object that allows to store and retrieve configuration settings.
/// </summary>
public interface IConfigurationContext
{
/// <summary>
/// Lists all context objects with specified name that are associated with current context.
/// </summary>
/// <param name="contextName">Name of the context to get.</param>
/// <param name="create">Create context if does not exist.</param>
/// <returns>Enumeration of contexts.</returns>
IEnumerable<IConfigurationContext> Get(string contextName, bool create);
/// <summary>
/// Lists all context objects associated with current context.
/// </summary>
/// <returns>Enumeration of contexts.</returns>
IEnumerable<IConfigurationContext> GetAll();
/// <summary>
/// Gets or sets a configuration value for specified name.
/// </summary>
/// <param name="name">Name of the setting.</param>
/// <returns>Setting value.</returns>
string this[string name] { get; set; }
/// <summary>
/// Gets a string that specifies the name of the context.
/// </summary>
string Name { get; }
/// <summary>
/// Creates new context object with a specified name.
/// </summary>
/// <param name="contextName">Name of the context to create.</param>
/// <returns>Configuration context object.</returns>
IConfigurationContext Create(string contextName);
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.