1 // ****************************************************************
\r
2 // Copyright 2002-2003, Charlie Poole
\r
3 // This is free software licensed under the NUnit license. You may
\r
4 // obtain a copy of the license at http://nunit.org/?p=license&r=2.4
\r
5 // ****************************************************************
\r
12 /// The ISettingsStorage interface is implemented by all
\r
13 /// types of backing storage for settings.
\r
15 public interface ISettingsStorage : IDisposable
\r
18 /// Load a setting from the storage.
\r
20 /// <param name="settingName">Name of the setting to load</param>
\r
21 /// <returns>Value of the setting or null</returns>
\r
22 object GetSetting( string settingName );
\r
25 /// Remove a setting from the storage
\r
27 /// <param name="settingName">Name of the setting to remove</param>
\r
28 void RemoveSetting( string settingName );
\r
31 /// Remove a group of settings from the storae
\r
33 /// <param name="groupName">Name of the group to remove</param>
\r
34 void RemoveGroup( string groupName );
\r
37 /// Save a setting in the storage
\r
39 /// <param name="settingName">Name of the setting to save</param>
\r
40 /// <param name="settingValue">Value to be saved</param>
\r
41 void SaveSetting( string settingName, object settingValue );
\r
44 /// Create a child storage of the same type
\r
46 /// <param name="name">Name of the child storage</param>
\r
47 /// <returns>New child storage</returns>
\r
48 ISettingsStorage MakeChildStorage( string name );
\r
51 /// Load settings from external storage if required
\r
52 /// by the implementation.
\r
54 void LoadSettings();
\r
57 /// Save settings to external storage if required
\r
58 /// by the implementation.
\r
60 void SaveSettings();
\r