Initial basic structure
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BoerseDataConvert
|
||||
{
|
||||
public class RecordController
|
||||
{
|
||||
private static int count = 1;
|
||||
public string ConvertToXml(Record record)
|
||||
{
|
||||
string xlmRecord = $"<record id=”{count}”>";
|
||||
foreach (var tagValue in record.TagsValues)
|
||||
{
|
||||
try
|
||||
{
|
||||
string tag = ConvertTag(tagValue.Key);
|
||||
CheckValues(tagValue.Key, tagValue.Value);
|
||||
xmlRecord += $"";
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
private string ConvertTag(string tag)
|
||||
{
|
||||
switch (tag)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
private void CheckValues(string tag, string value)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
13
BoerseDataConvert/BoerseDataConvert/Model/Record.cs
Normal file
13
BoerseDataConvert/BoerseDataConvert/Model/Record.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BoerseDataConvert
|
||||
{
|
||||
public class Record
|
||||
{
|
||||
public Dictionary<string, string> TagsValues;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace BoerseDataConvert
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
19
BoerseDataConvert/BoerseDataConvert/Views/Program.cs
Normal file
19
BoerseDataConvert/BoerseDataConvert/Views/Program.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.IO.Compression;
|
||||
|
||||
namespace BoerseDataConvert
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// Args format
|
||||
// -i *.zip or --input *.zip
|
||||
// -d directory or --dir directory
|
||||
// -o directory or --output direcory
|
||||
// -h - help
|
||||
|
||||
Console.WriteLine("Hello World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
12
BoerseDataConvert/BoerseDataConvert/Views/ZipHandler.cs
Normal file
12
BoerseDataConvert/BoerseDataConvert/Views/ZipHandler.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BoerseDataConvert
|
||||
{
|
||||
class ZipHandler
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user