" -", " , "? , , , - , , , . , .. , , .
EDIT: , :
List<DataSource> dataSources = ConnectToDataSources();
TimeSpan timeout = GetTimeoutFromConfiguration(); // Or have it passed in!
DateTime endTime = DateTime.UtcNow + timeout;
bool finished = false;
while (DateTime.UtcNow < endTime && !finished)
{
// This method should do a small amount of work and then return
// whether or not it finished everything
finished = ProcessDataSources(dataSources);
}
// Done - return up the stack and the console app will close.
, , .., , , .