File: ControlBuilderInterceptor.cs

package info (click to toggle)
mono 6.8.0.105%2Bdfsg-3.3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,284,512 kB
  • sloc: cs: 11,172,132; xml: 2,850,069; ansic: 671,653; cpp: 122,091; perl: 59,366; javascript: 30,841; asm: 22,168; makefile: 20,093; sh: 15,020; python: 4,827; pascal: 925; sql: 859; sed: 16; php: 1
file content (56 lines) | stat: -rw-r--r-- 4,095 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System.CodeDom;
using System.Collections;
using System.Web.UI;

namespace System.Web.Compilation
{
    /// <summary>
    /// 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 <see cref="System.Web.Configuration.CompilationSection.ControlBuilderInterceptorType"/> property
    /// and the compilation sytem calls into it's methods.
    /// </summary>
    public abstract class ControlBuilderInterceptor
    {
        /// <summary>
        /// This methood is called before a <see cref="System.Web.UI.ControlBuilder"/> for an element in the markup is initialized.
        /// </summary>
        /// <param name="controlBuilder">The control builder which is about to be initialized.</param>
        /// <param name="parser">The <see cref="System.Web.UI.TemplateParser"/> which was used to parse the markup.</param>
        /// <param name="parentBuilder">The parent control builder (typically the builder corresponding to the parent element in the markup).</param>
        /// <param name="type">The type of the control that this builder will create.</param>
        /// <param name="tagName">The name of the tag to be built.</param>
        /// <param name="id">ID of the element in the markup.</param>
        /// <param name="attributes">List of attributes of the element in the markup.</param>
        /// <param name="additionalState">This is an additional state which can be used to store/retrive data within several methods of <see cref="System.Web.Compilation.ControlBuilderInterceptor"/>.
        /// The state is per control builder.</param>
        public virtual void PreControlBuilderInit(ControlBuilder controlBuilder, 
                                                  TemplateParser parser, 
                                                  ControlBuilder parentBuilder, 
                                                  Type type, 
                                                  string tagName, 
                                                  string id, 
                                                  IDictionary attributes,
                                                  IDictionary additionalState) { 
        }

        /// <summary>
        /// This method is called after the code generation for this <see cref="System.Web.UI.ControlBuilder"/> is complete.
        /// </summary>
        /// <param name="controlBuilder">The control builder instance.</param>
        /// <param name="codeCompileUnit">This is the entire <see cref="System.CodeDom.CodeCompileUnit"/> that is being generated by the compilation.</param>
        /// <param name="baseType">The type declaration of code behind class. When code behind is not used, this is the same as <paramref name="derivedType"/>.</param>
        /// <param name="derivedType">The type declaration of top level markup element.</param>
        /// <param name="buildMethod">The method with necessary code to create the control and set it's various properties, events, fields.</param>
        /// <param name="dataBindingMethod">The method with code to evaluate data binding expressions within the control.</param>
        /// <param name="additionalState">This is an additional state which can be used to store/retrive data within several methods of <see cref="System.Web.Compilation.ControlBuilderInterceptor"/>.
        /// The state is per control builder.</param>
        public virtual void OnProcessGeneratedCode(ControlBuilder controlBuilder, 
                                                   CodeCompileUnit codeCompileUnit, 
                                                   CodeTypeDeclaration baseType, 
                                                   CodeTypeDeclaration derivedType, 
                                                   CodeMemberMethod buildMethod, 
                                                   CodeMemberMethod dataBindingMethod,
                                                   IDictionary additionalState) {
        }
    }
}