public Way Process(string Input, Config ConfigFile) { XmlDocument _document = new XmlDocument(); _document.LoadXml(Input); if (_document.FirstChild.NodeType == XmlNodeType.XmlDeclaration) _document.RemoveChild(_document.FirstChild); string json = JsonConvert.SerializeXmlNode(_document); CommonDataProcessor _cProcessor = new CommonDataProcessor(ConfigFile); List<Dictionary<string, object>> _output = ConvertToCorrect(_document); Way _out = new Way(null, _cProcessor.ConvertData(_output), null); return _out; }
public CommonDataProcessor(Config ConfigFile) { _config = ConfigFile; }
private void SaveFile(XmlDocument _doc , Config _config) { Console.WriteLine("Save JSOM file..."); string _fileName = DateTime.Now.ToString("yyyyMMdd") + _config.outputFileName + ".xml"; _doc.Save(_fileName); }
public ProcessorFactory(Config ConfigFile) { _config = ConfigFile; //_type = (FileType)Enum.Parse(typeof(FileType), ConfigFile.type); Console.WriteLine("File Type:" + Enum.GetName(typeof(FileType) , _config.type) + ", Load Processor..."); }
public void MakeXMLFile(Way OriginData , Config _config) { SaveFile(ConvertOSMXML(OriginData), _config); }
public Way Process(string Input, Config ConfigFile) { CommonDataProcessor _cProcessor = new CommonDataProcessor(ConfigFile); List<Dictionary<string, object>> _output = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(Input); Way _out = new Way(null, _cProcessor.ConvertData(_output), null); return _out; }
public DataDownloader(Config ConfigFile) { _config = ConfigFile; }
public Way Process(string Input, Config ConfigFile) { CommonDataProcessor _cProcessor = new CommonDataProcessor(ConfigFile); List<Dictionary<string, object>> _output = CSVReader.Read(Input); Way _out = new Way(null, _cProcessor.ConvertData(_output), null); return _out; }
public void Load() { Console.WriteLine("Load Config File..."); using (StreamReader _reader = new StreamReader("Config.json")) { string json = _reader.ReadToEnd(); _configResult = JsonConvert.DeserializeObject<Config>(json); } }