Terminate Process


Node Information
Terminates specified process. Use running processes, loop through them using For Each Loop and get information about each process, you can have conditions based on the process information and terminate the process the meets the criteria.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Terminate IN RUN MULTIPLE FALSE FALSE
Process IN Process ONE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.Win32.Processes
{
    [IsNode("Terminate Process")]
    public class TerminateProcess : Node
    {
        Port run = new Port(PortType.IN, typeof(RUN), AcceptsLinks.MULTIPLE, "Terminate");
        Port procObject = new Port(PortType.IN, typeof(System.Diagnostics.Process), AcceptsLinks.ONE, "Process");
        public TerminateProcess()
        {
            Name = "Terminate Process";
            NodeType = KGraph.NodeType.Method;
            AddPort(run);
            AddPort(procObject);
            Information = "Terminates specified process. " +
            "Use running processes, loop through them using For Each Loop and get information about each process, " +
            "you can have conditions based on the process information and terminate the process the meets the criteria.";
        }
        public override string Code()
        {
            return "((System.Diagnostics.Process)" + GetValue(procObject) + ").Kill();";
        }
    }
}