Пример #1
0
        private async Task ConvertImages()
        {
            bool isTitle = true;

            foreach (KeyValuePair <string, string> resPair in _resourceLocalToRemoteId)
            {
                string remoteId  = resPair.Value;
                string localName = resPair.Key;
                Log.Debug("downloading {name}...", remoteId);
                using (Stream source = await _client.DownloadResource(remoteId))
                {
                    SaveImage(source, localName, isTitle);
                    isTitle = false;
                }
            }
        }