diff --git a/.gitignore b/.gitignore index b9d6bd9..b0c5b86 100644 --- a/.gitignore +++ b/.gitignore @@ -213,3 +213,7 @@ pip-log.txt #Mr Developer .mr.developer.cfg +/.vs/LINQtoCSV/v15/Server/sqlite3/storage.ide-wal +/.vs/LINQtoCSV/v15/Server/sqlite3/storage.ide-shm +/.vs/LINQtoCSV/v15/Server/sqlite3/storage.ide +/.vs/LINQtoCSV/v15/Server/sqlite3/db.lock diff --git a/LINQtoCSV.Tests/CsvContextReadTests.cs b/LINQtoCSV.Tests/CsvContextReadTests.cs index b8f57d8..f8eb583 100644 --- a/LINQtoCSV.Tests/CsvContextReadTests.cs +++ b/LINQtoCSV.Tests/CsvContextReadTests.cs @@ -1,15 +1,11 @@ -using LINQtoCSV; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using System.IO; -using System.Collections.Generic; +using System; +using Xunit; namespace LINQtoCSV.Tests { - [TestClass()] public class CsvContextReadTests : Test { - [TestMethod()] + [Fact] public void GoodFileUsingOutputFormatForParsingDatesCharUSEnglish() { // Arrange @@ -45,7 +41,7 @@ public void GoodFileUsingOutputFormatForParsingDatesCharUSEnglish() AssertRead(testInput, fileDescription_namesUs, expected); } - [TestMethod()] + [Fact] public void GoodFileNoSeparatorCharUseOutputFormatForParsingUSEnglish() { // Arrange @@ -81,7 +77,7 @@ public void GoodFileNoSeparatorCharUseOutputFormatForParsingUSEnglish() AssertRead(testInput, fileDescription_namesUs, expected); } - [TestMethod()] + [Fact] public void GoodFileNoSeparatorCharUSEnglish() { // Arrange @@ -117,7 +113,7 @@ public void GoodFileNoSeparatorCharUSEnglish() AssertRead(testInput, fileDescription_namesUs, expected); } - [TestMethod()] + [Fact] public void GoodFileCommaDelimitedUseFieldIndexForReadingDataCharUSEnglish() { // Arrange @@ -154,7 +150,7 @@ public void GoodFileCommaDelimitedUseFieldIndexForReadingDataCharUSEnglish() AssertRead(testInput, fileDescription_namesUs, expected); } - [TestMethod()] + [Fact] public void GoodFileCommaDelimitedUseFieldIndexForReadingDataCharUseOutputFormatForParsingUSEnglish() { // Arrange @@ -194,7 +190,7 @@ public void GoodFileCommaDelimitedUseFieldIndexForReadingDataCharUseOutputFormat } - [TestMethod()] + [Fact] public void GoodFileCommaDelimitedNamesInFirstLineUSEnglish() { // Arrange @@ -242,7 +238,7 @@ and a quoted ""string""" AssertRead(testInput, fileDescription_namesUs, expected); } - [TestMethod()] + [Fact] public void GoodFileTabDelimitedNoNamesInFirstLineNLnl() { // Arrange @@ -283,7 +279,7 @@ and a quoted ""string""" AssertRead(testInput, fileDescription_nonamesNl, expected); } - [TestMethod()] + [Fact] public void GoodFileCommaDelimitedWithTrailingSeparatorChars() { // Arrange @@ -332,7 +328,7 @@ and a quoted ""string""" AssertRead(testInput, fileDescription_namesUs, expected); } - [TestMethod()] + [Fact] public void FileWithUnknownColumns_ShouldDiscardColumns() { var description = new CsvFileDescription { diff --git a/LINQtoCSV.Tests/CsvContextWriteTests.cs b/LINQtoCSV.Tests/CsvContextWriteTests.cs index aebc0a1..de2ef1f 100644 --- a/LINQtoCSV.Tests/CsvContextWriteTests.cs +++ b/LINQtoCSV.Tests/CsvContextWriteTests.cs @@ -1,16 +1,13 @@ -using LINQtoCSV; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using System.IO; +using System; using System.Collections.Generic; using System.Text; +using Xunit; namespace LINQtoCSV.Tests { - [TestClass()] public class CsvContextWriteTests : Test { - [TestMethod()] + [Fact] public void GoodFileCommaDelimitedNamesInFirstLineNLnl() { // Arrange diff --git a/LINQtoCSV.Tests/IAssertable.cs b/LINQtoCSV.Tests/IAssertable.cs index af0680e..907df4b 100644 --- a/LINQtoCSV.Tests/IAssertable.cs +++ b/LINQtoCSV.Tests/IAssertable.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace LINQtoCSV.Tests +namespace LINQtoCSV.Tests { public interface IAssertable { diff --git a/LINQtoCSV.Tests/LINQtoCSV.Tests.csproj b/LINQtoCSV.Tests/LINQtoCSV.Tests.csproj index 38d8f6b..abee391 100644 --- a/LINQtoCSV.Tests/LINQtoCSV.Tests.csproj +++ b/LINQtoCSV.Tests/LINQtoCSV.Tests.csproj @@ -1,79 +1,24 @@ - - + + - Debug - AnyCPU - - - 2.0 - {04EE17CD-E7B3-4D58-BF84-E553F5332A14} - Library - Properties - LINQtoCSV.Tests - LINQtoCSV.Tests - v4.0 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + netcoreapp2.0 + + false - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - 3.5 - - - - - - + - - False - + + + + + - - - - - - - - - - - - + + - - {07058BF9-6F86-40FF-AE33-2A4F89B5758A} - LINQtoCSV - + - - - \ No newline at end of file + + diff --git a/LINQtoCSV.Tests/Person.cs b/LINQtoCSV.Tests/Person.cs index 7ef109d..5c5e98d 100644 --- a/LINQtoCSV.Tests/Person.cs +++ b/LINQtoCSV.Tests/Person.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Xunit; namespace LINQtoCSV.Tests { @@ -15,9 +11,9 @@ public class Person : IAssertable { public int Age { get; set; } public void AssertEqual(Person other) { - Assert.AreEqual(other.Name, Name); - Assert.AreEqual(other.LastName, LastName); - Assert.AreEqual(other.Age, Age); + Assert.Equal(other.Name, Name); + Assert.Equal(other.LastName, LastName); + Assert.Equal(other.Age, Age); } } } diff --git a/LINQtoCSV.Tests/ProductData.cs b/LINQtoCSV.Tests/ProductData.cs index f9103a4..80317b0 100644 --- a/LINQtoCSV.Tests/ProductData.cs +++ b/LINQtoCSV.Tests/ProductData.cs @@ -1,15 +1,11 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Globalization; -using LINQtoCSV; +using Xunit; namespace LINQtoCSV.Tests { -// Because the fields in this type are used only indirectly, the compiler -// will warn they are unused or unassigned. Disable those warnings. + // Because the fields in this type are used only indirectly, the compiler + // will warn they are unused or unassigned. Disable those warnings. #pragma warning disable 0169, 0414, 0649 internal class ProductData : IAssertable @@ -62,18 +58,18 @@ internal class ProductData : IAssertable public void AssertEqual(ProductData other) { - Assert.AreNotEqual(other, null); + Assert.NotNull(other); - Assert.AreEqual(other.name, name, "name"); - Assert.AreEqual(other.startDate, startDate, "startDate"); - Assert.AreEqual(other.launchTime, launchTime, "launchTime"); - Assert.AreEqual(other.weight, weight, "weight"); - Assert.AreEqual(other.nbrAvailable, nbrAvailable, "nbrAvailable"); - Assert.AreEqual(other.shopsAvailable, shopsAvailable, "shopsAvailable"); - Assert.AreEqual(other.hexProductCode, hexProductCode, "hexProductCode"); - Assert.AreEqual(other.onsale, onsale, "onsale"); - Assert.AreEqual(other.retailPrice, retailPrice, "retailPrice"); - Assert.AreEqual(Utils.NormalizeString(other.description), Utils.NormalizeString(description), "description"); + Assert.Equal(other.name, name); + Assert.Equal(other.startDate, startDate); + Assert.Equal(other.launchTime, launchTime); + Assert.Equal(other.weight, weight); + Assert.Equal(other.nbrAvailable, nbrAvailable); + Assert.Equal(other.shopsAvailable, shopsAvailable); + Assert.Equal(other.hexProductCode, hexProductCode); + Assert.Equal(other.onsale, onsale); + Assert.Equal(other.retailPrice, retailPrice); + Assert.Equal(Utils.NormalizeString(other.description), Utils.NormalizeString(description)); } } } diff --git a/LINQtoCSV.Tests/ProductDataSpecificFieldIndex.cs b/LINQtoCSV.Tests/ProductDataSpecificFieldIndex.cs index f213421..229f174 100644 --- a/LINQtoCSV.Tests/ProductDataSpecificFieldIndex.cs +++ b/LINQtoCSV.Tests/ProductDataSpecificFieldIndex.cs @@ -1,15 +1,10 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System.Globalization; -using LINQtoCSV; +using Xunit; namespace LINQtoCSV.Tests { -// Because the fields in this type are used only indirectly, the compiler -// will warn they are unused or unassigned. Disable those warnings. + // Because the fields in this type are used only indirectly, the compiler + // will warn they are unused or unassigned. Disable those warnings. #pragma warning disable 0169, 0414, 0649 internal class ProductDataSpecificFieldIndex : IAssertable @@ -29,11 +24,11 @@ internal class ProductDataSpecificFieldIndex : IAssertable public void AssertEqual(ProductDataCharLength other) { - Assert.AreNotEqual(other, null); + Assert.NotNull(other); - Assert.AreEqual(other.name, name, "name"); - Assert.AreEqual(other.startDate, startDate, "startDate"); - Assert.AreEqual(other.weight, weight, "weight"); + Assert.Equal(other.name, name); + Assert.Equal(other.startDate, startDate); + Assert.Equal(other.weight, weight); } } @@ -75,10 +70,10 @@ internal class ProductDataParsingOutputFormat : IAssertable(IEnumerable actual, IEnumerable expected) where T : IAssertable { int count = actual.Count(); - Assert.AreEqual(count, expected.Count(), "counts"); + Assert.Equal(count, expected.Count()); for(int i = 0; i < count; i++) { @@ -120,7 +118,7 @@ public string TestWrite(IEnumerable values, CsvFileDescription fileDescrip public void AssertWrite(IEnumerable values, CsvFileDescription fileDescription, string expected) where T : class { string actual = TestWrite(values, fileDescription); - Assert.AreEqual(Utils.NormalizeString(actual), Utils.NormalizeString(expected)); + Assert.Equal(Utils.NormalizeString(actual), Utils.NormalizeString(expected)); } } } diff --git a/LINQtoCSV.Tests/TestDataRow.cs b/LINQtoCSV.Tests/TestDataRow.cs index b15a2fb..02c634b 100644 --- a/LINQtoCSV.Tests/TestDataRow.cs +++ b/LINQtoCSV.Tests/TestDataRow.cs @@ -1,8 +1,5 @@ -using System; +using LINQtoCSV; using System.Collections.Generic; -using System.Linq; -using System.Text; -using LINQtoCSV; namespace TestConsoleApplication { diff --git a/LINQtoCSV.Tests/Utils.cs b/LINQtoCSV.Tests/Utils.cs index 690ef5c..ad5c31b 100644 --- a/LINQtoCSV.Tests/Utils.cs +++ b/LINQtoCSV.Tests/Utils.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace LINQtoCSV.Tests +namespace LINQtoCSV.Tests { public static class Utils { diff --git a/LINQtoCSV.sln b/LINQtoCSV.sln index 62bbb72..378c72b 100644 --- a/LINQtoCSV.sln +++ b/LINQtoCSV.sln @@ -1,25 +1,17 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestConsoleApplication", "TestConsoleApplication\TestConsoleApplication.csproj", "{C3FE8ACB-688B-47E4-9E62-0EE09B0435E1}" +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27004.2006 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestConsoleApplication", "TestConsoleApplication\TestConsoleApplication.csproj", "{C3FE8ACB-688B-47E4-9E62-0EE09B0435E1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINQtoCSV", "LINQtoCSV\LINQtoCSV.csproj", "{07058BF9-6F86-40FF-AE33-2A4F89B5758A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINQtoCSV", "LINQtoCSV\LINQtoCSV.csproj", "{07058BF9-6F86-40FF-AE33-2A4F89B5758A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleCode", "SampleCode\SampleCode.csproj", "{EEFD875B-5D48-41F4-80FD-5FAE3725ED83}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleCode", "SampleCode\SampleCode.csproj", "{EEFD875B-5D48-41F4-80FD-5FAE3725ED83}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINQtoCSV.Tests", "LINQtoCSV.Tests\LINQtoCSV.Tests.csproj", "{04EE17CD-E7B3-4D58-BF84-E553F5332A14}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{23664B5F-ED48-4718-94B7-C1A65CDA45EE}" - ProjectSection(SolutionItems) = preProject - LINQtoCSV.vsmdi = LINQtoCSV.vsmdi - Local.testsettings = Local.testsettings - TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings - EndProjectSection +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINQtoCSV.Tests", "LINQtoCSV.Tests\LINQtoCSV.Tests.csproj", "{04EE17CD-E7B3-4D58-BF84-E553F5332A14}" EndProject Global - GlobalSection(TestCaseManagementSettings) = postSolution - CategoryFile = LINQtoCSV.vsmdi - EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU @@ -45,4 +37,10 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A03A0CEB-0934-45AA-8B5D-2399B9EED8BC} + EndGlobalSection + GlobalSection(TestCaseManagementSettings) = postSolution + CategoryFile = LINQtoCSV.vsmdi + EndGlobalSection EndGlobal diff --git a/LINQtoCSV/LINQtoCSV.csproj b/LINQtoCSV/LINQtoCSV.csproj index 17323b9..60b688f 100644 --- a/LINQtoCSV/LINQtoCSV.csproj +++ b/LINQtoCSV/LINQtoCSV.csproj @@ -1,114 +1,20 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {07058BF9-6F86-40FF-AE33-2A4F89B5758A} - Library - Properties - LINQtoCSV - LINQtoCSV - v3.5 - 512 - - - - - 3.5 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - - - - - + netstandard2.0 + 1.6.0.0 + Matt Perdeck + Matt Perdeck + Popular, easy to use library to read and write CSV and tab delimited files. Supports data fields containing commas and line breaks. Supports different character encodings, separator characters and date and number formats. Robust error handling lets you quickly fix problems in large input files. + 2018 + http://www.codeproject.com/Articles/25133/LINQ-to-CSV-library + https://opensource.org/licenses/apache2.0.php + CSV LINQ tab delimited + http://nuget.org/Media/Default/Packages/LinqToCsv/1.0.0.0/logo.jpg + https://github.com/mperdeck/LINQtoCSV + Git + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - + - - \ No newline at end of file diff --git a/LINQtoCSV/LINQtoCSV.nuspec b/LINQtoCSV/LINQtoCSV.nuspec deleted file mode 100644 index 0d70c1a..0000000 --- a/LINQtoCSV/LINQtoCSV.nuspec +++ /dev/null @@ -1,21 +0,0 @@ - - - - $id$ - $version$ - $title$ - $author$ - $author$ - http://www.codeproject.com/Articles/25133/LINQ-to-CSV-library - http://nuget.org/Media/Default/Packages/LinqToCsv/1.0.0.0/logo.jpg - false - - Serialise/Deserialize your classes to/from CSV and tab delimited files. Very flexible. Supports international date and number formats. - - $description$ - Copyright 2014 - CSV LINQ tab delimited - - - - \ No newline at end of file diff --git a/LINQtoCSV/Properties/AssemblyInfo.cs b/LINQtoCSV/Properties/AssemblyInfo.cs deleted file mode 100644 index 0605278..0000000 --- a/LINQtoCSV/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("LINQtoCSV")] -[assembly: AssemblyDescription("Popular, easy to use library to read and write CSV and tab delimited files. Supports data fields containing commas and line breaks. Supports different character encodings, separator characters and date and number formats. Robust error handling lets you quickly fix problems in large input files.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Matt Perdeck")] -[assembly: AssemblyProduct("LINQtoCSV")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("734dd618-3346-49b5-879d-25c2a4cccd63")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] diff --git a/SampleCode/Properties/AssemblyInfo.cs b/SampleCode/Properties/AssemblyInfo.cs deleted file mode 100644 index f484095..0000000 --- a/SampleCode/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SampleCode")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SampleCode")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("9a35945b-22c5-45af-8c4b-82e39aefac04")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SampleCode/SampleCode.csproj b/SampleCode/SampleCode.csproj index 08ae132..39bae42 100644 --- a/SampleCode/SampleCode.csproj +++ b/SampleCode/SampleCode.csproj @@ -1,118 +1,16 @@ - - + + - Debug - AnyCPU - 9.0.21022 - 2.0 - {EEFD875B-5D48-41F4-80FD-5FAE3725ED83} Exe - Properties - SampleCode - SampleCode - v3.5 - 512 - - - - - 3.5 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - - - - - + netcoreapp2.0 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - 3.5 - - - - - 3.5 - - - 3.5 - - - - - - - - - - - - + - - {07058BF9-6F86-40FF-AE33-2A4F89B5758A} - LINQtoCSV - + + - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - + - - - \ No newline at end of file + + diff --git a/TestConsoleApplication/Program.cs b/TestConsoleApplication/Program.cs index e82ff17..a1f741f 100644 --- a/TestConsoleApplication/Program.cs +++ b/TestConsoleApplication/Program.cs @@ -35,7 +35,7 @@ static void Main(string[] args) try { dataRows_namesUs = - cc.Read("../../TestFiles/goodfile_us.csv", fileDescription_namesUs); + cc.Read("TestFiles/goodfile_us.csv", fileDescription_namesUs); Utils.OutputData(dataRows_namesUs, "Good file, English US culture"); @@ -56,7 +56,7 @@ static void Main(string[] args) // Read raw data rows dataRows_namesUsRaw = - cc.Read("../../TestFiles/goodfile_us.csv", fileDescription_namesUs); + cc.Read("TestFiles/goodfile_us.csv", fileDescription_namesUs); Utils.OutputData(dataRows_namesUsRaw, "Good file, English US culture, Raw data rows"); } @@ -84,7 +84,7 @@ static void Main(string[] args) try { IEnumerable dataRows_nonamesNl = - cc.Read("../../TestFiles/goodfile_nl.csv", fileDescription_nonamesNl); + cc.Read("TestFiles/goodfile_nl.csv", fileDescription_nonamesNl); Utils.OutputData(dataRows_nonamesNl, "Good file, Dutch culture"); } @@ -112,7 +112,7 @@ static void Main(string[] args) try { using (StreamReader sr = - new StreamReader("../../TestFiles/goodfile_nl.csv", Encoding.UTF8)) + new StreamReader("TestFiles/goodfile_nl.csv", Encoding.UTF8)) { IEnumerable dataRows_nonamesNl = cc.Read(sr, fileDescription_nonamesNl_stream); @@ -133,7 +133,7 @@ static void Main(string[] args) try { IEnumerable dataRows2 = - cc.Read("../../TestFiles/goodfile_nl.csv", fileDescription_nonamesNl); + cc.Read("TestFiles/goodfile_nl.csv", fileDescription_nonamesNl); Utils.OutputData(dataRows2, "Good file, Dutch culture"); } @@ -147,7 +147,7 @@ static void Main(string[] args) try { IEnumerable dataRows2 = - cc.Read("../../TestFiles/goodfile_nl.csv", fileDescription_nonamesNl); + cc.Read("TestFiles/goodfile_nl.csv", fileDescription_nonamesNl); Utils.OutputData(dataRows2, "Good file, Dutch culture"); } @@ -170,7 +170,7 @@ static void Main(string[] args) try { IEnumerable dataRows_nonamesNl_bad = - cc.Read("../../TestFiles/goodfile_nl.csv", fileDescription_bad); + cc.Read("TestFiles/goodfile_nl.csv", fileDescription_bad); Utils.OutputData(dataRows_nonamesNl_bad, "Good file, Dutch culture"); } @@ -185,7 +185,7 @@ static void Main(string[] args) try { IEnumerable dataRows_namesUs_3 = - cc.Read("../../TestFiles/badfile_unknownname.csv", fileDescription_namesUs); + cc.Read("TestFiles/badfile_unknownname.csv", fileDescription_namesUs); Utils.OutputData(dataRows_namesUs_3, "Bad file, English US culture, unknown name"); } @@ -210,7 +210,7 @@ static void Main(string[] args) try { IEnumerable dataRows_namesUs_2 = - cc.Read("../../TestFiles/goodfile_us.csv", fileDescription_namesUs_enforceCsvColumn); + cc.Read("TestFiles/goodfile_us.csv", fileDescription_namesUs_enforceCsvColumn); Utils.OutputData(dataRows_namesUs_2, "Good file, English US culture"); } @@ -236,7 +236,7 @@ static void Main(string[] args) try { IEnumerable dataRows_namesUs_dataerrors = - cc.Read("../../TestFiles/badfile_us_dataerrors.csv", fileDescription_nonamesUs); + cc.Read("TestFiles/badfile_us_dataerrors.csv", fileDescription_nonamesUs); Utils.OutputData( dataRows_namesUs_dataerrors, @@ -273,7 +273,7 @@ static void Main(string[] args) { cc.Write( dataRows_Test, - "../../TestFiles/output_newdata_names_nl.csv", + "TestFiles/output_newdata_names_nl.csv", fileDescription_namesNl2); } catch (Exception e) @@ -297,7 +297,7 @@ static void Main(string[] args) { cc.Write( dataRows_namesUs, - "../../TestFiles/output_nonames_us.csv", + "TestFiles/output_nonames_us.csv", fileDescription_nonamesUs_output); } catch (Exception e) @@ -322,7 +322,7 @@ static void Main(string[] args) { cc.Write( dataRows_namesUs, - "../../TestFiles/output_names_nl.csv", + "TestFiles/output_names_nl.csv", fileDescription_namesNl); } catch (Exception e) @@ -357,7 +357,7 @@ orderby row.weight cc.Write( query, - "../../TestFiles/output_anon.csv", + "TestFiles/output_anon.csv", fileDescription_anon); } catch (Exception e) @@ -377,7 +377,7 @@ orderby row.weight { cc.Write( dataRows_namesUs, - "../../TestFiles/output_bad.csv", + "TestFiles/output_bad.csv", fileDescription_bad); } catch (Exception e) @@ -404,7 +404,7 @@ orderby row.weight cc.Write( emptyData, - "../../TestFiles/output_bad.csv", + "TestFiles/output_bad.csv", fileDescription_nonamesNl_2); } catch (Exception e) diff --git a/TestConsoleApplication/Properties/AssemblyInfo.cs b/TestConsoleApplication/Properties/AssemblyInfo.cs deleted file mode 100644 index e211159..0000000 --- a/TestConsoleApplication/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("TestConsoleApplication")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("TestConsoleApplication")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("cdd04580-d61d-41e7-a853-a770b66f818f")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/TestConsoleApplication/TestConsoleApplication.csproj b/TestConsoleApplication/TestConsoleApplication.csproj index a735f28..ec172c2 100644 --- a/TestConsoleApplication/TestConsoleApplication.csproj +++ b/TestConsoleApplication/TestConsoleApplication.csproj @@ -1,125 +1,16 @@ - - + + - Debug - AnyCPU - 9.0.30729 - 2.0 - {C3FE8ACB-688B-47E4-9E62-0EE09B0435E1} Exe - Properties - TestConsoleApplication - TestConsoleApplication - v3.5 - 512 - - - - - 3.5 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - - - - - + netcoreapp2.0 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - 3.5 - - - - - 3.5 - - - 3.5 - - - - - - - - - - - - - - - - - - - + - - {07058BF9-6F86-40FF-AE33-2A4F89B5758A} - LINQtoCSV - + + - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - + - - - \ No newline at end of file + +