PageRenderTime 47ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/BlogEngine/DotNetSlave.BusinessLogic/Providers/BlogProviderSection.cs

#
C# | 69 lines | 43 code | 7 blank | 19 comment | 0 complexity | a0332b3c07aa69b965b8fa16f3715690 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. namespace BlogEngine.Core.Providers
  2. {
  3. using System.Configuration;
  4. /// <summary>
  5. /// A configuration section for web.config.
  6. /// </summary>
  7. /// <remarks>
  8. /// In the config section you can specify the provider you
  9. /// want to use for BlogEngine.NET.
  10. /// </remarks>
  11. public class BlogProviderSection : ConfigurationSection
  12. {
  13. #region Properties
  14. /// <summary>
  15. /// Gets or sets the name of the default provider
  16. /// </summary>
  17. [StringValidator(MinLength = 1)]
  18. [ConfigurationProperty("defaultProvider", DefaultValue = "XmlBlogProvider")]
  19. public string DefaultProvider
  20. {
  21. get
  22. {
  23. return (string)base["defaultProvider"];
  24. }
  25. set
  26. {
  27. base["defaultProvider"] = value;
  28. }
  29. }
  30. /// <summary>
  31. /// Gets or sets the name of the file storage provider, defaults to the XmlBlogProvider if one is not specified
  32. /// </summary>
  33. /// <remarks>
  34. /// This attribute is not required, however allows for specifying different providers for various operations
  35. /// </remarks>
  36. [StringValidator(MinLength = 0)]
  37. [ConfigurationProperty("fileStoreProvider", IsRequired = false, DefaultValue = "XmlBlogProvider")]
  38. public string FileStoreProvider
  39. {
  40. get
  41. {
  42. return (string)base["fileStoreProvider"];
  43. }
  44. set
  45. {
  46. base["fileStoreProvider"] = value;
  47. }
  48. }
  49. /// <summary>
  50. /// Gets a collection of registered providers.
  51. /// </summary>
  52. [ConfigurationProperty("providers")]
  53. public ProviderSettingsCollection Providers
  54. {
  55. get
  56. {
  57. return (ProviderSettingsCollection)base["providers"];
  58. }
  59. }
  60. #endregion
  61. }
  62. }