Light12306/TrainInfomationProviderService/TrainInfo/TrainInfoSearchProvider.cs
2014-11-21 20:32:36 +08:00

29 lines
905 B
C#

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] 完成创建车站-车次信息索引对象");
}
}
}