public static LexTool Construct(Job job, ILexInput input) { if (input is FileInfo info) { return(info.IsInteractive ? (LexTool) new InteractiveLexTool() : new FileLexTool(info)); } throw new InvalidOperationException($"{input.GetType()} not supported for LexTool"); }
public ITool BuildLexJobTool(Job job, ILexInput input) => LexTool.Construct(job, input);