private Process CreateProcess(Node node, Type type, Credentials credentials, Process.Printer printer) { Logger.Debug(type); object[] args; if (type == typeof(ServerAdmin)) { args = new object[] { node.NextPID, printer, node, credentials, this }; } else { args = new object[] { node.NextPID, printer, node, credentials }; } return((Process)Activator.CreateInstance(type, args)); }
private Process CreateProcess(Node node, Type type, Credentials credentials, Process.Printer printer) { Console.WriteLine(type); return((Process)Activator.CreateInstance(type, new object[] { node.NextPID, printer, node, credentials })); }
private Process CreateProcess(Node node, string type, Credentials credentials, Process.Printer printer) { return(CreateProcess(node, Type.GetType($"HackLinks_Server.Computers.Processes.{type}"), credentials, printer)); }