public virtual OAuthFlow Build()
{
if (httpClient == null)
{
httpClient = new DefaultHttpClient();
}
if (tokenURL == null)
{
tokenURL = DEFAULT_TOKEN_URL;
}
if (authorizationURL == null)
{
authorizationURL = DEFAULT_AUTHORIZATION_URL;
}
if (jsonSerializer == null)
{
jsonSerializer = new JsonNetSerializer();
}
if (clientId == null || clientSecret == null || redirectURL == null)
{
throw new InvalidOperationException();
}
return new OAuthFlowImpl(clientId, clientSecret, redirectURL, authorizationURL, tokenURL, httpClient, jsonSerializer);
}