private async Task GetImageStream(IApiClient apiClient, BaseItemDto item, List <Stream> list)
        {
            var url = apiClient.GetImageUrl(item, CollageOptions);

            try
            {
                using (var client = TileService.CreateClient())
                {
                    var response = await client.GetAsync(url);

                    if (response.IsSuccessStatusCode)
                    {
                        var stream = await response.Content.ReadAsStreamAsync();

                        list.Add(stream);
                    }
                }
            }
            catch (HttpException ex)
            {
                _logger.ErrorException("GetImageStream()", ex);
            }

            list = null;
        }
 public TileService(IConnectionManager connectionManager, IStorageService storageService)
 {
     _logger = new WPLogger(typeof(TileService));
     _logger.Info("Starting TileService");
     _connectionManager = connectionManager;
     _storageService = storageService.Local;
     Current = this;
 }
Beispiel #3
0
 public TileService(IConnectionManager connectionManager, IStorageService storageService)
 {
     _logger = new WPLogger(typeof(TileService));
     _logger.Info("Starting TileService");
     _connectionManager = connectionManager;
     _storageService    = storageService.Local;
     Current            = this;
 }