retag
[mcs.git] / nunit24 / ClientUtilities / util / SettingsStorage.cs
blob1aa4246ea61310147c757fe1a7208327d5db25e9
1 // ****************************************************************
2 // Copyright 2002-2003, Charlie Poole
3 // This is free software licensed under the NUnit license. You may
4 // obtain a copy of the license at http://nunit.org/?p=license&r=2.4
5 // ****************************************************************
7 namespace NUnit.Util
9 using System;
11 /// <summary>
12 /// The ISettingsStorage interface is implemented by all
13 /// types of backing storage for settings.
14 /// </summary>
15 public interface ISettingsStorage : IDisposable
17 /// <summary>
18 /// Load a setting from the storage.
19 /// </summary>
20 /// <param name="settingName">Name of the setting to load</param>
21 /// <returns>Value of the setting or null</returns>
22 object GetSetting( string settingName );
24 /// <summary>
25 /// Remove a setting from the storage
26 /// </summary>
27 /// <param name="settingName">Name of the setting to remove</param>
28 void RemoveSetting( string settingName );
30 /// <summary>
31 /// Remove a group of settings from the storae
32 /// </summary>
33 /// <param name="groupName">Name of the group to remove</param>
34 void RemoveGroup( string groupName );
36 /// <summary>
37 /// Save a setting in the storage
38 /// </summary>
39 /// <param name="settingName">Name of the setting to save</param>
40 /// <param name="settingValue">Value to be saved</param>
41 void SaveSetting( string settingName, object settingValue );
43 /// <summary>
44 /// Create a child storage of the same type
45 /// </summary>
46 /// <param name="name">Name of the child storage</param>
47 /// <returns>New child storage</returns>
48 ISettingsStorage MakeChildStorage( string name );
50 /// <summary>
51 /// Load settings from external storage if required
52 /// by the implementation.
53 /// </summary>
54 void LoadSettings();
56 /// <summary>
57 /// Save settings to external storage if required
58 /// by the implementation.
59 /// </summary>
60 void SaveSettings();