Exemple #1
0
        public void DownloadAndSave()
        {
            string data1 = null;
            string data2 = null;

            Parallel.Invoke(
                () => data1 = _downloadFromInternet1.Download(),
                () => data2 = _downloadFromInternet2.Download());
            _saveToDatabase.Save(data1 + data2);
        }
Exemple #2
0
        public void DownloadAndSave()
        {
            var data = _downloadFromInternet.Download();

            _saveToDatabase.Save(data);
        }