Beispiel #1
0
    public Collection(EnumStaticDataType type)
    {
        _collectionOfData = new CollectionOfData();
        _type             = type;
        switch (_type)
        {
        case EnumStaticDataType.withOutType:
            break;

        case EnumStaticDataType.carriage:
            _collectionOfData.InitCollaction <CarriageVO>(UrlXmls.CARRIAGE_LIST);
            break;

        case EnumStaticDataType.mission:
            _collectionOfData.InitCollaction <MissionVO>(UrlXmls.MISSION_LIST);
            break;

        case EnumStaticDataType.railway:
            _collectionOfData.InitCollaction <RailwayVO>(UrlXmls.RAILWAY_LIST);
            break;

        case EnumStaticDataType.terminal:
            _collectionOfData.InitCollaction <TerminalVO>(UrlXmls.TERMINAL_LIST);
            break;

        case EnumStaticDataType.train:
            _collectionOfData.InitCollaction <TrainVO>(UrlXmls.TRAIN_LIST);
            break;

        default:
            break;
        }
    }
Beispiel #2
0
 /// <summary>
 /// Get Collection data by static type
 /// </summary>
 /// <param name="type">Static type</param>
 /// <returns>Static data</returns>
 public CollectionOfData GetCollectionByType(EnumStaticDataType type)
 {
     if (!_allStaticData.ContainsKey(type))
     {
         LoggingManager.AddErrorToLog("Try get static collection by type " + type.ToString());
         return(null);
     }
     return(_allStaticData[type]);
 }