ControlBuilder.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. //
  2. // System.Web.UI.ControlBuilder.cs
  3. //
  4. // Duncan Mak ([email protected])
  5. //
  6. // (C) Ximian, Inc.
  7. //
  8. using System;
  9. using System.Collections;
  10. namespace System.Web.UI {
  11. public class ControlBuilder
  12. {
  13. TemplateParser parser;
  14. ControlBuilder parentBuilder;
  15. Type type;
  16. string tagName;
  17. string id;
  18. IDictionary attribs;
  19. int line;
  20. string fileName;
  21. public ControlBuilder ()
  22. {
  23. }
  24. internal ControlBuilder (
  25. TemplateParser parser, ControlBuilder parentBuilder,
  26. Type type, string tagName, string id,
  27. IDictionary attribs, int line, string sourceFileName)
  28. {
  29. this.parser = parser;
  30. this.parentBuilder = parentBuilder;
  31. this.type = type;
  32. this.tagName = tagName;
  33. this.id = id;
  34. this.attribs = attribs;
  35. this.line = line;
  36. this.fileName = sourceFileName;
  37. }
  38. public Type ControlType {
  39. get { return type; }
  40. }
  41. [MonoTODO]
  42. public bool FChildrenAsProperties {
  43. get { return false; }
  44. }
  45. [MonoTODO]
  46. public bool FIsNonParserAccessor {
  47. get { return false; }
  48. }
  49. [MonoTODO]
  50. public bool HasAspCode {
  51. get { return false; }
  52. }
  53. public string ID {
  54. get { return id; }
  55. set { id = value; }
  56. }
  57. [MonoTODO]
  58. public bool InDesigner {
  59. get { return false; }
  60. }
  61. [MonoTODO]
  62. public Type NamingContainerType {
  63. get { return null; }
  64. }
  65. protected TemplateParser Parser {
  66. get { return parser; }
  67. }
  68. public string TagName {
  69. get { return tagName; }
  70. }
  71. [MonoTODO]
  72. public virtual bool AllowWhitespaceLiterals ()
  73. {
  74. return false;
  75. }
  76. [MonoTODO]
  77. public virtual void AppendLiteralString (string s)
  78. {
  79. throw new NotImplementedException ();
  80. }
  81. [MonoTODO]
  82. public virtual void AppendSubBuilder (ControlBuilder subBuilder)
  83. {
  84. throw new NotImplementedException ();
  85. }
  86. [MonoTODO]
  87. public virtual void CloseControl ()
  88. {
  89. }
  90. [MonoTODO]
  91. public static ControlBuilder CreateBuilderFromType (
  92. TemplateParser parser, ControlBuilder parentBuilder,
  93. Type type, string tagName, string id,
  94. IDictionary attribs, int line, string sourceFileName)
  95. {
  96. return new ControlBuilder (parser, parentBuilder, type,
  97. tagName, id, attribs, line, sourceFileName);
  98. }
  99. [MonoTODO]
  100. public virtual Type GetChildControlType (string tagName, IDictionary attribs)
  101. {
  102. return attribs [tagName] as Type;
  103. }
  104. [MonoTODO]
  105. public virtual bool HasBody ()
  106. {
  107. return false;
  108. }
  109. [MonoTODO]
  110. public virtual bool HtmlDecodeLiterals ()
  111. {
  112. return false;
  113. }
  114. [MonoTODO]
  115. public virtual void Init (
  116. TemplateParser parser, ControlBuilder parentBuilder,
  117. Type type, string tagName, string id, IDictionary attribs)
  118. {
  119. throw new NotImplementedException ();
  120. }
  121. [MonoTODO]
  122. public virtual bool NeedsTagInnerText ()
  123. {
  124. throw new NotImplementedException ();
  125. }
  126. [MonoTODO]
  127. public virtual void OnAppendToParentBuilder ()
  128. {
  129. throw new NotImplementedException ();
  130. }
  131. [MonoTODO]
  132. public virtual void SetTagInnerText (string text)
  133. {
  134. throw new NotImplementedException ();
  135. }
  136. }
  137. }