예제 #1
0
 public ModelDataContainer Transform(IEnumerable<ModelMap> maps, ModelDataContainer items)
 {
     return  DataRepository.Transform(maps,items);
 }
예제 #2
0
        public void DoExport()
        {
            try
            {
                ResultsViewContent += "\nCreating Export...";
                //Create ETL Layer
                string xmlFile =
                    Path.Combine(new FileInfo(System.Reflection.Assembly.GetEntryAssembly().Location).Directory.FullName,
                        string.Format("{0}.xml", Path.GetFileNameWithoutExtension(_inputFileLocation)));
                var service = new RepositoryData();
                var theContainer = new ModelDataContainer();

                //Extract
                theContainer = service.DataRepository.Create(this._inputFileLocation, new RepositoryMaps(xmlFile).Maps);

                //Transform
                theContainer = service.DataRepository.Transform(new RepositoryMaps(xmlFile).Maps, theContainer);

                //Load
                service.DataRepository.Save(Path.Combine(
                    Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
                    string.Format("{0}.Output.csv", Path.GetFileNameWithoutExtension(_inputFileLocation))),
                    theContainer);

                ResultsViewContent += "\nOutput exported to the Desktop...";
            }
            catch (Exception ex)
            {
                LoggerSingleton.Instance.LogMessage(ex);
            }
        }
예제 #3
0
 public void Save(string destination, ModelDataContainer items)
 {
     DataRepository.Save(destination,items);
 }
 public CsvModelDataContainerExport(ModelDataContainer theContainer)
 {
     _theContainer = theContainer;
 }