/ViewStateHandlers/TinyPagePersister/TinyPagePersisterConfigurationHandler.cs

http://viewstatehandlers.codeplex.com · C# · 26 lines · 23 code · 3 blank · 0 comment · 0 complexity · f0aa70825c5bf89305c0c92b8c4d0a80 MD5 · raw file

  1. using System.Configuration;
  2. namespace Rioshu.Web.ViewStateHandlers
  3. {
  4. public class TinyPagePersisterConfigurationHandler : ConfigurationSection
  5. {
  6. [ConfigurationProperty("fieldName", DefaultValue = "__VSTATE")]
  7. public string FieldName
  8. {
  9. get { return this["fieldName"].ToString(); }
  10. }
  11. [ConfigurationProperty("compressionType", DefaultValue = CompressionType.GZip)]
  12. public CompressionType CompressionType
  13. {
  14. get { return (CompressionType) this["compressionType"]; }
  15. }
  16. public static TinyPagePersisterConfigurationHandler GetConfiguration()
  17. {
  18. return
  19. ConfigurationManager.GetSection("viewStateHandlers/tinyPagePersister") as
  20. TinyPagePersisterConfigurationHandler;
  21. }
  22. }
  23. }