PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/BlogEngine/DotNetSlave.BusinessLogic/DataStore/Interfaces.cs

#
C# | 66 lines | 16 code | 6 blank | 44 comment | 0 complexity | 7444c312073b80d6ff177c4d040edf13 MD5 | raw file
 1namespace BlogEngine.Core.DataStore
 2{
 3    /// <summary>
 4    /// Type of extension
 5    /// </summary>
 6    public enum ExtensionType
 7    {
 8        /// <summary>
 9        ///     An Extension.
10        /// </summary>
11        Extension, 
12
13        /// <summary>
14        ///     A Widget Extension.
15        /// </summary>
16        Widget, 
17
18        /// <summary>
19        ///     A Theme Extension.
20        /// </summary>
21        Theme
22    }
23
24    /// <summary>
25    /// Public interfaces and enums for DataStore
26    ///     ISettingsBehavior incapsulates saving and retreaving
27    ///     settings objects to and from data storage
28    /// </summary>
29    public interface ISettingsBehavior
30    {
31        #region Public Methods
32
33        /// <summary>
34        /// Get settings interface
35        /// </summary>
36        /// <param name="extensionType">
37        /// Extension Type
38        /// </param>
39        /// <param name="extensionId">
40        /// Extension Id
41        /// </param>
42        /// <returns>
43        /// Settings object
44        /// </returns>
45        object GetSettings(ExtensionType extensionType, string extensionId);
46
47        /// <summary>
48        /// Save settings interface
49        /// </summary>
50        /// <param name="extensionType">
51        /// Extensio Type
52        /// </param>
53        /// <param name="extensionId">
54        /// Extensio Id
55        /// </param>
56        /// <param name="settings">
57        /// Settings object
58        /// </param>
59        /// <returns>
60        /// True if saved
61        /// </returns>
62        bool SaveSettings(ExtensionType extensionType, string extensionId, object settings);
63
64        #endregion
65    }
66}