public virtual void ExportCode(ActionBranch currentAction, ActionBranch nextAction, ILimnorCodeCompiler compiler, IMethodCompile methodToCompile, CodeMemberMethod method, CodeStatementCollection statements, bool debug) { loadEventAction(); if (_eventAction != null) { _eventAction.AttachCodeDomAction(methodToCompile, statements, debug); } }
public override bool OnExportCode(ActionBranch previousAction, ActionBranch nextAction, ILimnorCodeCompiler compiler, CodeMemberMethod method, CodeStatementCollection statements) { if (_eventAction != null) { _eventAction.AttachCodeDomAction(this.Method, statements, false); } return(false); }
public virtual void ExportCode(ActionBranch currentAction, ActionBranch nextAction, ILimnorCodeCompiler compiler, IMethodCompile methodToCompile, CodeMemberMethod method, CodeStatementCollection statements, bool debug) { loadEventAction(); if (_eventAction != null) { _eventAction.AttachCodeDomAction(methodToCompile, statements, debug); //ClassPointer root = _class; //CodeExpression methodTarget; //CodeEventReferenceExpression ceRef = _eventAction.Event.GetReferenceCode(methodToCompile, statements, false) as CodeEventReferenceExpression; //if (_eventAction.Event.IsStatic) // methodTarget = new CodeTypeReferenceExpression(root.CodeName); //else // methodTarget = new CodeThisReferenceExpression(); //CodeAttachEventStatement caes = new CodeAttachEventStatement(ceRef, // new CodeDelegateCreateExpression(new CodeTypeReference(_eventAction.Event.EventHandlerType.TypeString), // methodTarget, _eventAction.GetLocalHandlerName())); //statements.Add(caes); } }