Exemplo n.º 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);
		}
Exemplo n.º 2
0
 public virtual ICodeNode VisitDelegateInvocationExpression(DelegateInvocationExpression node)
 {
     node.Target    = (Expression)Visit(node.Target);
     node.Arguments = (ExpressionCollection)Visit(node.Arguments);
     return(node);
 }
Exemplo n.º 3
0
		public virtual void VisitDelegateInvocationExpression (DelegateInvocationExpression node)
		{
			Visit (node.Target);
			Visit (node.Arguments);
		}
Exemplo n.º 4
0
 public virtual void VisitDelegateInvocationExpression(DelegateInvocationExpression node)
 {
     Visit(node.Target);
     Visit(node.Arguments);
 }
Exemplo n.º 5
0
		public override void VisitDelegateInvocationExpression (DelegateInvocationExpression node)
		{
			Visit (node.Target);
			WriteToken ("(");
			VisitList (node.Arguments);
			WriteToken (")");
		}