TrainNotifier.Service.TiplocRepository.PreloadCache C# (CSharp) Method

PreloadCache() public method

public PreloadCache ( ) : void
return void
        public void PreloadCache()
        {
            var all = GetTiplocs();

            foreach (var tiploc in all.Where(t=> !string.IsNullOrWhiteSpace(t.Stanox)).ToLookup(t => t.Stanox))
            {
                AddToCache(tiploc.Key, tiploc);
            }
        }