source: BMXNET_RPMS_dotNET_UTILITIES-BMX/branch/IHS BMX Framework/IndianHealthService.BMXNet.WinForm/Configuration/PersistentStore.cs@ 1146

Last change on this file since 1146 was 1146, checked in by Sam Habiel, 13 years ago

Initial Import of BMX4

File size: 1.7 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Text;
4using System.IO;
5
6namespace IndianHealthService.BMXNet.WinForm.Configuration
7{
8
9 /// <summary>
10 /// The persistent store interface is to save local setting configuration data. The
11 /// settings are written and read based on a string a keys, like a path.
12 ///
13 /// The keys are application specific. Some example could be: "Product","Version"
14 ///
15 /// The location of the PersistentStore is based on the implementation. The LocalPersistentStore
16 /// provides the settings to be stored in special OS forlders like Environment.SpecialFolder.LocalApplicationData
17 /// so that the settings would be based both on the logged in user and keys.
18 /// </summary>
19 public interface PersistentStore
20 {
21
22 /// <summary>
23 /// The implementor must serialize the object anObject given the keys.
24 /// </summary>
25 /// <typeparam name="T">The type of the object to be serialized to the store</typeparam>
26 /// <param name="anObject">The objects to be stored</param>
27 /// <param name="keys">The key used to locate the settings</param>
28 void Write<T>(T anObject, params string[] keys);
29
30 /// <summary>
31 /// The implementor must deserialize an object of type T from the given location based
32 /// on the keys
33 /// </summary>
34 /// <typeparam name="T">The type of the object to be deserialized from the store</typeparam>
35 /// <param name="keys">The keys used to locate the object</param>
36 /// <returns>An deserialized object, or null if no valid objects exists at the keys</returns>
37 T Read<T>(params string[] keys);
38 }
39}
Note: See TracBrowser for help on using the repository browser.