public async void AddStationToRefreshingPool(Station station)
{
if (!station.Loaded)
{
var contract = station.Contract;
if (contract != null)
{
if (await contract.RefreshAsync(station).ConfigureAwait(false))
{
if (station.IsUiRefreshNeeded)
{
StationRefreshed?.Invoke(station, EventArgs.Empty);
}
}
if (contract.ImageAvailability)
{
station.IsInRefreshPool = true;
refreshingPool.Add(station);
if (!IsStationWorkerRunning)
{
StartRefreshStationsAsync();
}
}
}
}
}