ParseChildrenAttribute.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //
  2. // System.Web.UI.ParseChildrenAttribute.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 ParseChildrenAttribute : Attribute
  12. {
  13. bool childrenAsProperties;
  14. string defaultProperty;
  15. // LAMESPEC
  16. public ParseChildrenAttribute ()
  17. {
  18. childrenAsProperties = false;
  19. defaultProperty = "";
  20. }
  21. public ParseChildrenAttribute (bool childrenAsProperties)
  22. {
  23. this.childrenAsProperties = childrenAsProperties;
  24. this.defaultProperty = "";
  25. }
  26. public ParseChildrenAttribute (bool childrenAsProperties,
  27. string defaultProperty)
  28. {
  29. this.childrenAsProperties = childrenAsProperties;
  30. this.defaultProperty = defaultProperty;
  31. }
  32. public static readonly ParseChildrenAttribute Default;
  33. public bool ChildrenAsProperties {
  34. get { return childrenAsProperties; }
  35. set { childrenAsProperties = value; }
  36. }
  37. public string DefaultProperty {
  38. get { return defaultProperty; }
  39. set { defaultProperty = value; }
  40. }
  41. [MonoTODO]
  42. public override bool Equals (object obj)
  43. {
  44. return false;
  45. }
  46. [MonoTODO]
  47. public override int GetHashCode ()
  48. {
  49. return 42;
  50. }
  51. [MonoTODO]
  52. public override bool IsDefaultAttribute ()
  53. {
  54. return false;
  55. }
  56. }
  57. }