Пример #1
0
        public override Node VisitGetProcessIntent(GetProcessIntent intent)
        {
            var typeExpression = new TypeExpression("System.Diagnostics.Process");

            if (intent.Id != null)
            {
                return(new Invocation(new MemberAccess(typeExpression, "GetProcessById"), new ArgumentList(new Argument(intent.Id))));
            }
            if (intent.Name != null)
            {
                return(new Invocation(new MemberAccess(typeExpression, "GetProcessesByName"), new ArgumentList(new Argument(intent.Name))));
            }
            return(new Invocation(new MemberAccess(typeExpression, "GetProcesses"), new ArgumentList()));
        }
Пример #2
0
 public virtual Node VisitGetProcessIntent(GetProcessIntent intent)
 {
     return(intent.Node);
 }