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;
}
}