using System.CodeDom; using System.Collections; using System.Web.UI; namespace System.Web.Compilation { /// /// This is an abstract class whose implementation can be used to control or customize the compilation process. /// A type that extends this class can be registered in web.config using property /// and the compilation sytem calls into it's methods. /// public abstract class ControlBuilderInterceptor { /// /// This methood is called before a for an element in the markup is initialized. /// /// The control builder which is about to be initialized. /// The which was used to parse the markup. /// The parent control builder (typically the builder corresponding to the parent element in the markup). /// The type of the control that this builder will create. /// The name of the tag to be built. /// ID of the element in the markup. /// List of attributes of the element in the markup. /// This is an additional state which can be used to store/retrive data within several methods of . /// The state is per control builder. public virtual void PreControlBuilderInit(ControlBuilder controlBuilder, TemplateParser parser, ControlBuilder parentBuilder, Type type, string tagName, string id, IDictionary attributes, IDictionary additionalState) { } /// /// This method is called after the code generation for this is complete. /// /// The control builder instance. /// This is the entire that is being generated by the compilation. /// The type declaration of code behind class. When code behind is not used, this is the same as . /// The type declaration of top level markup element. /// The method with necessary code to create the control and set it's various properties, events, fields. /// The method with code to evaluate data binding expressions within the control. /// This is an additional state which can be used to store/retrive data within several methods of . /// The state is per control builder. public virtual void OnProcessGeneratedCode(ControlBuilder controlBuilder, CodeCompileUnit codeCompileUnit, CodeTypeDeclaration baseType, CodeTypeDeclaration derivedType, CodeMemberMethod buildMethod, CodeMemberMethod dataBindingMethod, IDictionary additionalState) { } } }