public static ScriptInterpreter FindOrCreate(string type, object self, ScriptInterpreter parent) { ScriptInterpreterFactory maker; if (parent == null) { maker = GetInterpreterFactory(type); } else { maker = parent.GetLoaderOfFiletype(type) ?? GetInterpreterFactory(type); } if (maker == null) { return(null); } ScriptInterpreter si = maker.GetLoaderOfFiletype(type); if (si == null) { return(null); } return(si.newInterpreter(self)); }