Smartsheet.Api.OAuth.OAuthFlowBuilder.Build C# (CSharp) Méthode

Build() public méthode

Build the OAuthFlow instance.
if ClientId, ClientSecret or RedirectURL isn't set yet.
public Build ( ) : OAuthFlow
Résultat OAuthFlow
        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);
        }