diff --git a/Translate/Translate/Services/MainService.cs b/Translate/Translate/Services/MainService.cs
index c3e09cf..83e4538 100644
--- a/Translate/Translate/Services/MainService.cs
+++ b/Translate/Translate/Services/MainService.cs
@@ -1,6 +1,7 @@
using Translate.Interface;
using Microsoft.Extensions.Configuration;
using System.Text;
+using MarketData.Utils;
namespace Translate.Services
{
@@ -14,6 +15,24 @@ namespace Translate.Services
public class MainService : IMainService
{
public void RunService(String[] args,IConfiguration configuration)
+ {
+ Profiler profiler = new Profiler();
+
+ try
+ {
+ Translate(args, configuration);
+ }
+ catch(Exception exception)
+ {
+ Console.WriteLine($"{exception.ToString()}");
+ }
+ finally
+ {
+ Console.WriteLine($"Translate done, total took {Utility.FormatNumber(profiler.End(),0,true)}(ms");
+ }
+ }
+
+ private void Translate(String[] args,IConfiguration configuration)
{
bool includeInserts = true;
bool useMaxLines = false;
@@ -129,8 +148,6 @@ namespace Translate.Services
streamWriter.Flush();
streamWriter.Close();
streamWriter.Dispose();
-
- Console.WriteLine("Done.");
}
}
}
\ No newline at end of file
diff --git a/Translate/Translate/Translate.csproj b/Translate/Translate/Translate.csproj
index f0735f6..a3784c3 100644
--- a/Translate/Translate/Translate.csproj
+++ b/Translate/Translate/Translate.csproj
@@ -13,6 +13,10 @@
translate
+
+
+
+