IParserAccessor 接口


定义 ASP.NET 服务器控件必须实现以识别何时分析元素(HTML 或 XML)的方法。Defines the method that ASP.NET server controls must implement to recognize when elements, either HTML or XML, are parsed.

public interface class IParserAccessor
public interface IParserAccessor
type IParserAccessor = interface
Public Interface IParserAccessor


分析元素时, 它们被识别为实现此接口的服务器控件的子控件。When elements are parsed, they are recognized as child controls of the server control that implements this interface. 这些元素将转换为对象。These elements are converted to objects. 实现此接口时, 所创建的控件将定义在通知已分析某个元素后发生的处理。When you implement this interface, the control you create defines what processing occurs once it has been notified that an element has been parsed.

由于类实现了此接口, 因此更易于扩展该类并重写其AddParsedSubObject方法实现, 而不是自行实现此接口。 ControlBecause the Control class implements this interface, it is easier to extend that class and override its implementation of the AddParsedSubObject method than to implement this interface yourself.



由 ASP.NET 服务器控件实现时,通知服务器控件已分析元素(XML 或 HTML)。When implemented by an ASP.NET server control, notifies the server control that an element, either XML or HTML, was parsed.