public DelegateInvokeExpression( EventReferenceExpression firedEvent, params Expression[] parameters)
 {
     if (firedEvent == null)
         throw new ArgumentNullException("firedEvent");
     this.firedEvent = firedEvent;
     this.parameters.AddRange(parameters);
 }
Example #2
0
 public DelegateInvokeExpression(EventReferenceExpression firedEvent, params Expression[] parameters)
 {
     if (firedEvent == null)
     {
         throw new ArgumentNullException("firedEvent");
     }
     this.firedEvent = firedEvent;
     this.parameters.AddRange(parameters);
 }
 public AttachRemoveEventStatement(EventReferenceExpression eventRef, Expression listener,bool attach)
 {
     if (eventRef==null)
         throw new ArgumentNullException("eventRef");
     if (listener==null)
         throw new ArgumentNullException("listener");
     this.eventRef = eventRef;
     this.listener = listener;
     this.attach=attach;
 }
Example #4
0
 public static AttachRemoveEventStatement Attach(
     EventReferenceExpression eventRef,
     Expression listener)
 {
     return new AttachRemoveEventStatement(eventRef,listener,true);
 }
Example #5
0
 /// <summary>
 /// Create a <c>firedEvent(parameters)</c> invocation.</c>
 /// </summary>
 /// <param name="firedEvent">Delegate to invoke</param>
 /// <param name="parameters">Delegate arguments</param>
 /// <returns></returns>
 public static DelegateInvokeExpression DelegateInvoke(
     EventReferenceExpression firedEvent, 
     params Expression[] parameters
     )
 {
     if (firedEvent == null)
         throw new ArgumentNullException("firedEvent");
     DelegateInvokeExpression expr = new DelegateInvokeExpression(firedEvent, parameters);
     return expr;
 }