public MethodInvokeExpression( MethodReferenceExpression method, params Expression[] parameters ) { if (method==null) throw new ArgumentNullException("method"); this.invokedMethod = method; this.parameters.AddRange(parameters); }
public DelegateCreateExpression(ITypeDeclaration delegateType, MethodReferenceExpression targetMethod) { if (delegateType==null) throw new ArgumentNullException("delegateType"); if (targetMethod==null) throw new ArgumentNullException("targetMethod"); this.delegateType = delegateType; this.targetMethod = targetMethod; }
public MethodInvokeExpression( MethodReferenceExpression method, params Expression[] parameters ) { if (method == null) { throw new ArgumentNullException("method"); } this.invokedMethod = method; this.parameters.AddRange(parameters); }
public DelegateCreateExpression(ITypeDeclaration delegateType, MethodReferenceExpression targetMethod) { if (delegateType == null) { throw new ArgumentNullException("delegateType"); } if (targetMethod == null) { throw new ArgumentNullException("targetMethod"); } this.delegateType = delegateType; this.targetMethod = targetMethod; }
/// <summary> /// Creates a delegate constructr /// </summary> /// <param name="delegateType"> /// The delegate type /// </param> /// <param name="method"> /// The listener method /// </param> /// <returns> /// A <see cref="DelegateCreateExpression"/> representing the /// delegate creation. /// </returns> /// <exception cref="ArgumentNullException"> /// <paramref name="delegateType"/> or <paramref name="method"/> /// is a null reference (Nothing in Visual Basic) /// </exception> public static DelegateCreateExpression Delegate( Type delegateType, MethodReferenceExpression method) { if (delegateType==null) throw new ArgumentNullException("delegateType"); if (method==null) throw new ArgumentNullException("method"); return new DelegateCreateExpression(new TypeTypeDeclaration(delegateType),method); }