Beispiel #1
0
		public override ICodeNode VisitMethodInvocationExpression (MethodInvocationExpression node)
		{
			var method_ref = node.Method as MethodReferenceExpression;
			if (method_ref == null)
				goto skip;
			
			var method = method_ref.Method;
			if (method.Name != "Invoke")
				goto skip;
			
			if (!method.DeclaringType.Resolve ().IsDelegate ())
				goto skip;

			var invoke = new DelegateInvocationExpression (method_ref.Target);
			
			invoke.Arguments = node.Arguments;
			
			return invoke;

		skip:
			return base.VisitMethodInvocationExpression (node);
		}
Beispiel #2
0
 public virtual ICodeNode VisitDelegateInvocationExpression(DelegateInvocationExpression node)
 {
     node.Target    = (Expression)Visit(node.Target);
     node.Arguments = (ExpressionCollection)Visit(node.Arguments);
     return(node);
 }
Beispiel #3
0
		public virtual void VisitDelegateInvocationExpression (DelegateInvocationExpression node)
		{
			Visit (node.Target);
			Visit (node.Arguments);
		}
 public virtual void VisitDelegateInvocationExpression(DelegateInvocationExpression node)
 {
     Visit(node.Target);
     Visit(node.Arguments);
 }
Beispiel #5
0
		public override void VisitDelegateInvocationExpression (DelegateInvocationExpression node)
		{
			Visit (node.Target);
			WriteToken ("(");
			VisitList (node.Arguments);
			WriteToken (")");
		}