diff --git a/.idea/.idea.VE_Count_Consolidator/.idea/projectSettingsUpdater.xml b/.idea/.idea.VE_Count_Consolidator/.idea/projectSettingsUpdater.xml new file mode 100644 index 0000000..7515e76 --- /dev/null +++ b/.idea/.idea.VE_Count_Consolidator/.idea/projectSettingsUpdater.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 9cee0d6..ecc796d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: csharp solution: VE_Count_Consolidator.sln mono: none -dotnet: 2.1.300 +dotnet: 3.0.100 script: - dotnet restore - dotnet build diff --git a/README.md b/README.md index bf4a267..c72a056 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ This repository contains two components: - VECountConsolidatorCli -- CLI frontend that uses the library above. ### VECountConsolidator +This library is available from [NuGet](https://www.nuget.org/packages/VECountConsolidator/). + Library handling the process. Caller should call Process() function with appropriate `enum` currently only supports `VEC.ARRL`. Return the list of the following format. diff --git a/VECountConsolidator/VECountConsolidator.csproj b/VECountConsolidator/VECountConsolidator.csproj index 7498610..1a359cd 100644 --- a/VECountConsolidator/VECountConsolidator.csproj +++ b/VECountConsolidator/VECountConsolidator.csproj @@ -1,20 +1,27 @@ - netstandard2.0 + netcoreapp3.0 Hideki Saito Hideki Saito Volunteer Examiner Session Count Consolidator Library VECountConsolidator VECountConsolidator Consolidates Volunteer Examiner participation counts. - Copyright (c) 2018 Hideki Saito + Copyright (c) 2019 Hideki Saito https://github.com/hsaito/VE_Count_Consolidator/blob/master/LICENSE https://github.com/hsaito/VE_Count_Consolidator - 1.5.0.0 - 1.5.0.0 - 1.5.0.0 + 1.6.0.0 + 1.6.0.0 + 1.6.0.0 latest + + true + /_/ + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\')) + $(RepoRoot)=$(DeterministicSourceRoot) + + diff --git a/VECountConsolidatorCli/Program.cs b/VECountConsolidatorCli/Program.cs index 343ee83..8316b69 100644 --- a/VECountConsolidatorCli/Program.cs +++ b/VECountConsolidatorCli/Program.cs @@ -3,25 +3,16 @@ using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; -using System.Reflection; -using System.Xml; using CommandLine; using CsvHelper; -using log4net; -using log4net.Config; -using log4net.Repository.Hierarchy; using VECountConsolidator; namespace VECountConsolidatorCli { internal class Program { - private static readonly ILog Log = LogManager.GetLogger(typeof(Program)); - - public static int Main(string[] args) { - if (!InitializeLogging()) return -1; try { Parser.Default.ParseArguments(args).WithParsed( @@ -29,13 +20,14 @@ public static int Main(string[] args) } catch (Exception ex) { - Log.Fatal(ex.Message); + Console.Error.WriteLine(ex.Message); return -1; } return 0; } + private static void Generate(Options options) { if (options.Mode != "create") return; @@ -79,34 +71,7 @@ private static void Output(IEnumerable persons) } catch (Exception e) { - Log.Error(e.Message); - } - } - - /// - /// Initialize logging - /// - private static bool InitializeLogging() - { - try - { - // Configuration for logging - var log4NetConfig = new XmlDocument(); - - using (var reader = new StreamReader(new FileStream("log4net.config", FileMode.Open, FileAccess.Read))) - { - log4NetConfig.Load(reader); - } - - var rep = LogManager.CreateRepository(Assembly.GetEntryAssembly(), typeof(Hierarchy)); - XmlConfigurator.Configure(rep, log4NetConfig["log4net"]); - return true; - } - catch (Exception ex) - { - Console.WriteLine("Error initializing the logging."); - Console.WriteLine(ex.Message); - return false; + Console.Error.WriteLine(e.Message); } } diff --git a/VECountConsolidatorCli/VECountConsolidatorCli.csproj b/VECountConsolidatorCli/VECountConsolidatorCli.csproj index 35a6efe..0115fc3 100644 --- a/VECountConsolidatorCli/VECountConsolidatorCli.csproj +++ b/VECountConsolidatorCli/VECountConsolidatorCli.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp2.1 + netcoreapp3.0 VE Count Consolidator Hideki Saito Hideki Saito @@ -11,10 +11,9 @@ Copyright (c) 2018 Hideki Saito https://github.com/hsaito/VE_Count_Consolidator/blob/master/LICENSE https://github.com/hsaito/VE_Count_Consolidator - 1.5.0.0 - 1.5.0.0 - 1.5.0.0 - linux-x64,linux-arm,win-x64,win-x86,osx-x64 + 1.6.0.0 + 1.6.0.0 + 1.6.0.0 latest @@ -22,12 +21,14 @@ - - - Always - - + + + true + /_/ + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\')) + $(RepoRoot)=$(DeterministicSourceRoot) + \ No newline at end of file diff --git a/VECountConsolidatorCli/log4net.config b/VECountConsolidatorCli/log4net.config deleted file mode 100644 index ecef996..0000000 --- a/VECountConsolidatorCli/log4net.config +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file