AuthenticationException GetException(CFStreamErrorHTTPAuthentication code) { switch (code) { case CFStreamErrorHTTPAuthentication.BadUserName: throw new InvalidCredentialException("Bad username."); case CFStreamErrorHTTPAuthentication.BadPassword: throw new InvalidCredentialException("Bad password."); case CFStreamErrorHTTPAuthentication.TypeUnsupported: throw new AuthenticationException("Authentication type not supported."); default: throw new AuthenticationException("Unknown error."); } }
AuthenticationException GetException (CFStreamErrorHTTPAuthentication code) { switch (code) { case CFStreamErrorHTTPAuthentication.BadUserName: throw new InvalidCredentialException ("Bad username."); case CFStreamErrorHTTPAuthentication.BadPassword: throw new InvalidCredentialException ("Bad password."); case CFStreamErrorHTTPAuthentication.TypeUnsupported: throw new AuthenticationException ("Authentication type not supported."); default: throw new AuthenticationException ("Unknown error."); } }