Smrf.NodeXL.GraphDataProviders.Twitter.TwitterSearchNetworkAnalyzer.BackgroundWorker_DoWork C# (CSharp) Method

BackgroundWorker_DoWork() protected method

protected BackgroundWorker_DoWork ( object sender, DoWorkEventArgs e ) : void
sender object
e System.ComponentModel.DoWorkEventArgs
return void
    BackgroundWorker_DoWork
    (
        object sender,
        DoWorkEventArgs e
    )
    {
        Debug.Assert(e.Argument is GetNetworkAsyncArgs);

        GetNetworkAsyncArgs oGetNetworkAsyncArgs =
            (GetNetworkAsyncArgs)e.Argument;

        try
        {
            e.Result = GetNetworkInternal(
                oGetNetworkAsyncArgs.SearchTerm,
                oGetNetworkAsyncArgs.WhatToInclude,
                oGetNetworkAsyncArgs.MaximumStatuses
                );
        }
        catch (CancellationPendingException)
        {
            e.Cancel = true;
        }
    }