PartialCachingAttribute.cs 974 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // System.Web.UI.PartialCachingAttribute.cs
  3. //
  4. // Duncan Mak ([email protected])
  5. //
  6. // (C) Ximian, Inc.
  7. //
  8. using System;
  9. namespace System.Web.UI {
  10. [AttributeUsage (AttributeTargets.Class)]
  11. public sealed class PartialCachingAttribute : Attribute
  12. {
  13. int duration;
  14. string varyByControls;
  15. string varyByCustom;
  16. string varyByParams;
  17. public PartialCachingAttribute (int duration)
  18. {
  19. this.duration = duration;
  20. }
  21. public PartialCachingAttribute (int duration, string varyByParams,
  22. string varyByControls, string varyByCustom)
  23. {
  24. this.duration = duration;
  25. this.varyByParams = varyByParams;
  26. this.varyByControls = varyByControls;
  27. this.varyByCustom = varyByCustom;
  28. }
  29. public int Duration {
  30. get { return duration; }
  31. }
  32. public string VaryByParams {
  33. get { return varyByParams; }
  34. }
  35. public string VaryByControls {
  36. get { return varyByControls; }
  37. }
  38. public string VaryByCustom {
  39. get { return varyByCustom; }
  40. }
  41. }
  42. }