Example #1
0
        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.");
            }
        }
Example #2
0
		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.");
			}
		}