EasyBike.Models.ContractService.AddStationToRefreshingPool C# (CSharp) Method

AddStationToRefreshingPool() public method

public AddStationToRefreshingPool ( Station station ) : void
station Station
return void
        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();
                        }
                    }
                }
            }
        }