System.Web.Compilation.TemplateControlCompiler.AddEventAssign C# (CSharp) Method

AddEventAssign() static private method

static private AddEventAssign ( CodeMemberMethod method, ControlBuilder builder, string name, Type type, string value ) : void
method System.CodeDom.CodeMemberMethod
builder System.Web.UI.ControlBuilder
name string
type System.Type
value string
return void
		void AddEventAssign (CodeMemberMethod method, ControlBuilder builder, string name, Type type, string value)
		{
			//"__ctrl.{0} += new {1} (this.{2});"
			CodeEventReferenceExpression evtID = new CodeEventReferenceExpression (ctrlVar, name);

			CodeDelegateCreateExpression create;
			create = new CodeDelegateCreateExpression (new CodeTypeReference (type), thisRef, value);

			CodeAttachEventStatement attach = new CodeAttachEventStatement (evtID, create);
			method.Statements.Add (attach);
		}
		
TemplateControlCompiler