Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 15490e7a authored by Markus QUARITSCH's avatar Markus QUARITSCH
Browse files

read declaration data from delcaration folder instead of embedded data

parent e1b22fb6
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.IO;
using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils; using TUGraz.VectoCommon.Utils;
...@@ -61,13 +62,15 @@ namespace TUGraz.VectoCore.Models.Declaration ...@@ -61,13 +62,15 @@ namespace TUGraz.VectoCore.Models.Declaration
protected static DataTable ReadCsvResource(string resourceId) protected static DataTable ReadCsvResource(string resourceId)
{ {
#if USE_EXTENAL_DECLARATION_DATA //#if USE_EXTENAL_DECLARATION_DATA
var tmp = resourceId.Replace(DeclarationData.DeclarationDataResourcePrefix + ".", "");
var parts = tmp.Split('.');
return return
VectoCSVFile.Read(Path.Combine("Declaration", VectoCSVFile.Read(Path.Combine("Declaration", string.Join(".", parts[parts.Length - 2], parts[parts.Length - 1])
resourceId.Replace(DeclarationData.DeclarationDataResourcePrefix + ".", ""))); ));
#else //#else
return VectoCSVFile.ReadStream(RessourceHelper.ReadStream(resourceId), source: resourceId); // return VectoCSVFile.ReadStream(RessourceHelper.ReadStream(resourceId), source: resourceId);
#endif //#endif
} }
protected static void NormalizeTable(DataTable table) protected static void NormalizeTable(DataTable table)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment