TryLoad() 공개 메소드

public TryLoad ( String &token, String &secret ) : System.Boolean
token String
secret String
리턴 System.Boolean
        BeforeGetNetwork()
        {
            AssertValid();

            // TwitterAccessToken caches the access token it reads from disk.  Make
            // sure the latest access token is read.

            TwitterAccessToken oTwitterAccessToken = new TwitterAccessToken();

            // A network should never be requested if the access token hasn't been
            // saved yet.

            String sToken, sSecret;

            if (!oTwitterAccessToken.TryLoad(out sToken, out sSecret))
            {
                throw new Exception("Twitter access token not set.");
            }

            m_oTwitterUtil = new TwitterUtil(sToken, sSecret,
                                             HttpNetworkAnalyzerBase.UserAgent,
                                             HttpNetworkAnalyzerBase.HttpWebRequestTimeoutMs);
        }
    BeforeGetNetwork()
    {
        AssertValid();

        // TwitterAccessToken caches the access token it reads from disk.  Make
        // sure the latest access token is read.

        TwitterAccessToken oTwitterAccessToken = new TwitterAccessToken();

        // A network should never be requested if the access token hasn't been
        // saved yet.

        String sToken, sSecret;

        if ( !oTwitterAccessToken.TryLoad(out sToken, out sSecret) )
        {
            throw new Exception("Twitter access token not set.");
        }

        m_oTwitterUtil = new TwitterUtil(sToken, sSecret,
            HttpNetworkAnalyzerBase.UserAgent,
            HttpNetworkAnalyzerBase.HttpWebRequestTimeoutMs);
    }