Line data Source code
1 : #region Copyright
2 : // // -----------------------------------------------------------------------
3 : // // <copyright company="Chinchilla Software Limited">
4 : // // Copyright Chinchilla Software Limited. All rights reserved.
5 : // // </copyright>
6 : // // -----------------------------------------------------------------------
7 : #endregion
8 :
9 : namespace Cqrs.Configuration
10 : {
11 : /// <summary>
12 : /// Provides access to configuration settings.
13 : /// </summary>
14 : public interface IConfigurationManager
15 : {
16 : /// <summary>
17 : /// Read the setting named <paramref name="key"/>.
18 : /// </summary>
19 : /// <param name="key">The key (or name) of the setting to read.</param>
20 1 : string GetSetting(string key);
21 :
22 : /// <summary>
23 : /// Read the setting named <paramref name="key"/>.
24 : /// </summary>
25 : /// <param name="key">The key (or name) of the setting to read.</param>
26 : /// <param name="value">When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.</param>
27 : /// <returns>true if the an element with the specified key exists; otherwise, false.</returns>
28 1 : bool TryGetSetting(string key, out string value);
29 :
30 : /// <summary>
31 : /// Read the setting named <paramref name="key"/>.
32 : /// </summary>
33 : /// <param name="key">The key (or name) of the setting to read.</param>
34 : /// <param name="value">When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.</param>
35 : /// <returns>true if the an element with the specified key exists; otherwise, false.</returns>
36 1 : bool TryGetSetting(string key, out bool value);
37 : }
38 : }
|