using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using TrainInfomationProviderService.TrainInfo.Entities; namespace TrainInfomationProviderService.TrainInfo { public class TrainInfoSearchProvider { public IndexStorage Storage { get; private set; } public TrainInfoSearchProvider(IndexStorage storage) { Trace.TraceInformation("[TRAIN_INFO_SEARCH_PROVIDER] 正在创建车站-车次信息索引对象"); Storage = storage; foreach (var trainInfoStorage in storage.TrainInfoStorages) { Trace.TraceInformation("[TRAIN_INFO_SEARCH_PROVIDER] 正在初始化 {0} 车站-车次信息索引对象", trainInfoStorage.Key); trainInfoStorage.Value.InitStationTrainData(); } Trace.TraceInformation("[TRAIN_INFO_SEARCH_PROVIDER] 完成创建车站-车次信息索引对象"); } } }