public Interpreter(InterpreterManager manager, string id, string name, IRInterpreterInfo rInterpreterInfo) { Manager = manager; Id = id; Name = name; Path = rInterpreterInfo.InstallPath; BinPath = rInterpreterInfo.BinPath; Version = rInterpreterInfo.Version; RInterpreterInfo = rInterpreterInfo; }
private IConnection PickBestLocalRConnection(ICollection <IConnection> connections, ICollection <IRInterpreterInfo> localEngines) { // Get highest version engine IRInterpreterInfo rInfo = null; if (localEngines.Any()) { var highest = localEngines.Max(e => e.Version); rInfo = localEngines.First(e => e.Version == highest); } if (rInfo != null) { // Find connection matching the highest version var c = connections.FirstOrDefault(e => e.Path.PathEquals(rInfo.InstallPath)); if (c != null) { return(c); } } // Nothing found or incompatible. Try first user connection in the list, if any return(connections.FirstOrDefault()); }
public Interpreter(string id, string name, IRInterpreterInfo rInterpreterInfo) { Id = id; Name = name; RInterpreterInfo = rInterpreterInfo; }
public Interpreter(string id, IRInterpreterInfo rInterpreterInfo) : this(id, rInterpreterInfo.Name, rInterpreterInfo) { }