/// <summary> /// 创建方法,将构造器获取的数据构造成MetroModel /// </summary> /// <returns>MetroModel,失败时返回null</returns> public MetroModel Build() { if (_fileUrl == null) { OnError(ErrorInfoManager.BUILDER_NO_FROM); return(null); } // Read v from file. V v; if ((v = FileUtils.ReadV(_fileUrl, _onError)) == null) { return(null); } // v to metroLines. _model = new MetroModel(new DataAdapter(v).GetMetroLines(), new DataAdapter(v).GetAllStations(), _name); return(_model); }
public Thinker(MetroModel metro) { this._metro = metro; }