internal RConSession TryCreateSession(RConCredentials creds) { if (VerifyCredentials == null || !VerifyCredentials(creds)) { throw new AuthenticationException("Invalid credentials"); } var session = new RConSession(creds, SessionTimeout); if (_sessions.ContainsKey(creds.Name)) { _sessions[creds.Name] = session; } else { _sessions.Add(creds.Name, session); } return(session); }
internal RConSession TryCreateSession(RConCredentials creds) { if (VerifyCredentials == null || !VerifyCredentials(creds)) { throw new AuthenticationException("Invalid credentials"); } var session = new RConSession(creds, SessionTimeout); if (_sessions.ContainsKey(creds.Name)) { _sessions[creds.Name] = session; } else { _sessions.Add(creds.Name, session); } return session; }