From de36586c6412f811dce675d47a0fd028653fd629 Mon Sep 17 00:00:00 2001 From: GoldenCrystal Date: Mon, 3 Nov 2014 00:05:54 +0100 Subject: [PATCH] Restructured the projects, and put all the data construction logic in a separate assembly. --- System.Unicode.snk | Bin 0 -> 596 bytes UnicodeCharacterInspector.sln | 11 +++ .../CharacterInspectorViewModel.cs | 2 +- UnicodeInformation.Builder/App.config | 6 ++ .../FileUcdSource.cs | 5 +- .../HttpUcdSource.cs | 2 +- .../IUcdSource.cs | 2 +- UnicodeInformation.Builder/Program.cs | 15 ++++ .../Properties/AssemblyInfo.cs | 36 ++++++++ .../UnicodeCharacterDataBuilder.cs | 2 +- .../UnicodeDataBuilder.cs | 2 +- .../UnicodeDataFileReader.cs | 2 +- .../UnicodeDataManager.cs | 2 +- .../UnicodeInformation.Builder.csproj | 81 ++++++++++++++++++ .../UnicodeDataManagerTests.cs | 7 +- .../UnicodeInformation.Tests.csproj | 21 +---- UnicodeInformation.Tests/packages.config | 6 -- UnicodeInformation/BidirectionalClass.cs | 2 +- UnicodeInformation/CanonicalCombiningClass.cs | 2 +- UnicodeInformation/CodePointEnumerable.cs | 2 +- UnicodeInformation/CodePointEnumerator.cs | 2 +- UnicodeInformation/ContributoryProperties.cs | 2 +- UnicodeInformation/EnumHelper.cs | 2 +- UnicodeInformation/Properties/AssemblyInfo.cs | 1 + UnicodeInformation/StringExtensions.cs | 2 +- .../UnicodeCategoryExtensions.cs | 7 +- UnicodeInformation/UnicodeCategoryInfo.cs | 2 +- UnicodeInformation/UnicodeCharacterData.cs | 2 +- UnicodeInformation/UnicodeCharacterRange.cs | 2 +- UnicodeInformation/UnicodeData.cs | 23 ++++- UnicodeInformation/UnicodeInformation.csproj | 31 +++---- UnicodeInformation/UnicodeNumericType.cs | 2 +- UnicodeInformation/UnicodeRationalNumber.cs | 2 +- UnicodeInformation/ValueNameAttribute.cs | 2 +- UnicodeInformation/packages.config | 6 -- 35 files changed, 217 insertions(+), 79 deletions(-) create mode 100644 System.Unicode.snk create mode 100644 UnicodeInformation.Builder/App.config rename {UnicodeInformation.Tests => UnicodeInformation.Builder}/FileUcdSource.cs (81%) rename {UnicodeInformation => UnicodeInformation.Builder}/HttpUcdSource.cs (95%) rename {UnicodeInformation => UnicodeInformation.Builder}/IUcdSource.cs (87%) create mode 100644 UnicodeInformation.Builder/Program.cs create mode 100644 UnicodeInformation.Builder/Properties/AssemblyInfo.cs rename {UnicodeInformation => UnicodeInformation.Builder}/UnicodeCharacterDataBuilder.cs (99%) rename {UnicodeInformation => UnicodeInformation.Builder}/UnicodeDataBuilder.cs (99%) rename {UnicodeInformation => UnicodeInformation.Builder}/UnicodeDataFileReader.cs (99%) rename {UnicodeInformation => UnicodeInformation.Builder}/UnicodeDataManager.cs (99%) create mode 100644 UnicodeInformation.Builder/UnicodeInformation.Builder.csproj delete mode 100644 UnicodeInformation.Tests/packages.config delete mode 100644 UnicodeInformation/packages.config diff --git a/System.Unicode.snk b/System.Unicode.snk new file mode 100644 index 0000000000000000000000000000000000000000..dc404c67f7c2b33118b8b614eb52b8c0c7354abd GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50097T9i`_RvLJ_-?KW9{VvK9{R2ys+e%_Qd zInkZv5JzLZFGASBBR;76=jVdd;?kTq2B_%V9Qt_rtL&6&7Jqvy9XV|ms8~6zmh!%n z3=aCJlgPQYre(iS%2u0Jx$3_)2G`0j~DPh3@xp8!=MrPyo4wOAYYGCzylky&u=Rzvp z)wd!Q?Wr}z*A~ksP2%DT#-j4V7H;mp@lB`?;ntEIxOC2PI?!PlOsKH~v3j z9H%8;9YR!W59ac{4Z8??sPRcm^P)S;?zhsey))-I;u**r!W&i-Hbzg+D`ZY0&d{|h i(eH{CzmGW0#AQKFG6>Gin#&(5R?u3uD7mOB$e + + + + + \ No newline at end of file diff --git a/UnicodeInformation.Tests/FileUcdSource.cs b/UnicodeInformation.Builder/FileUcdSource.cs similarity index 81% rename from UnicodeInformation.Tests/FileUcdSource.cs rename to UnicodeInformation.Builder/FileUcdSource.cs index 2fe34d0..aaa4e9c 100644 --- a/UnicodeInformation.Tests/FileUcdSource.cs +++ b/UnicodeInformation.Builder/FileUcdSource.cs @@ -4,10 +4,11 @@ using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Unicode; -namespace UnicodeInformation.Tests +namespace System.Unicode.Builder { - internal sealed class FileUcdSource : IUcdSource + public sealed class FileUcdSource : IUcdSource { private readonly string baseDirectory; diff --git a/UnicodeInformation/HttpUcdSource.cs b/UnicodeInformation.Builder/HttpUcdSource.cs similarity index 95% rename from UnicodeInformation/HttpUcdSource.cs rename to UnicodeInformation.Builder/HttpUcdSource.cs index 1662675..1c1a171 100644 --- a/UnicodeInformation/HttpUcdSource.cs +++ b/UnicodeInformation.Builder/HttpUcdSource.cs @@ -6,7 +6,7 @@ using System.Net.Http; using System.Text; using System.Threading.Tasks; -namespace UnicodeInformation +namespace System.Unicode.Builder { public class HttpUcdSource : IUcdSource { diff --git a/UnicodeInformation/IUcdSource.cs b/UnicodeInformation.Builder/IUcdSource.cs similarity index 87% rename from UnicodeInformation/IUcdSource.cs rename to UnicodeInformation.Builder/IUcdSource.cs index 197085e..63e350d 100644 --- a/UnicodeInformation/IUcdSource.cs +++ b/UnicodeInformation.Builder/IUcdSource.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace UnicodeInformation +namespace System.Unicode.Builder { public interface IUcdSource { diff --git a/UnicodeInformation.Builder/Program.cs b/UnicodeInformation.Builder/Program.cs new file mode 100644 index 0000000..ecf3e38 --- /dev/null +++ b/UnicodeInformation.Builder/Program.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace System.Unicode.Builder +{ + class Program + { + static void Main(string[] args) + { + } + } +} diff --git a/UnicodeInformation.Builder/Properties/AssemblyInfo.cs b/UnicodeInformation.Builder/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..fcc4038 --- /dev/null +++ b/UnicodeInformation.Builder/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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("UnicodeInformation.Builder")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("UnicodeInformation.Builder")] +[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("8dfdee6c-4f0d-4de1-b346-574cb56d2b8b")] + +// 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/UnicodeInformation/UnicodeCharacterDataBuilder.cs b/UnicodeInformation.Builder/UnicodeCharacterDataBuilder.cs similarity index 99% rename from UnicodeInformation/UnicodeCharacterDataBuilder.cs rename to UnicodeInformation.Builder/UnicodeCharacterDataBuilder.cs index aa8627c..5ac5f3c 100644 --- a/UnicodeInformation/UnicodeCharacterDataBuilder.cs +++ b/UnicodeInformation.Builder/UnicodeCharacterDataBuilder.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace UnicodeInformation +namespace System.Unicode.Builder { public sealed class UnicodeCharacterDataBuilder { diff --git a/UnicodeInformation/UnicodeDataBuilder.cs b/UnicodeInformation.Builder/UnicodeDataBuilder.cs similarity index 99% rename from UnicodeInformation/UnicodeDataBuilder.cs rename to UnicodeInformation.Builder/UnicodeDataBuilder.cs index 98d0560..336b183 100644 --- a/UnicodeInformation/UnicodeDataBuilder.cs +++ b/UnicodeInformation.Builder/UnicodeDataBuilder.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace UnicodeInformation +namespace System.Unicode.Builder { public class UnicodeDataBuilder { diff --git a/UnicodeInformation/UnicodeDataFileReader.cs b/UnicodeInformation.Builder/UnicodeDataFileReader.cs similarity index 99% rename from UnicodeInformation/UnicodeDataFileReader.cs rename to UnicodeInformation.Builder/UnicodeDataFileReader.cs index bd8cea3..174b47e 100644 --- a/UnicodeInformation/UnicodeDataFileReader.cs +++ b/UnicodeInformation.Builder/UnicodeDataFileReader.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace UnicodeInformation +namespace System.Unicode.Builder { public class UnicodeDataFileReader : IDisposable { diff --git a/UnicodeInformation/UnicodeDataManager.cs b/UnicodeInformation.Builder/UnicodeDataManager.cs similarity index 99% rename from UnicodeInformation/UnicodeDataManager.cs rename to UnicodeInformation.Builder/UnicodeDataManager.cs index e331d9d..4efb6f5 100644 --- a/UnicodeInformation/UnicodeDataManager.cs +++ b/UnicodeInformation.Builder/UnicodeDataManager.cs @@ -6,7 +6,7 @@ using System.Net.Http; using System.Text; using System.Threading.Tasks; -namespace UnicodeInformation +namespace System.Unicode.Builder { public class UnicodeDataManager { diff --git a/UnicodeInformation.Builder/UnicodeInformation.Builder.csproj b/UnicodeInformation.Builder/UnicodeInformation.Builder.csproj new file mode 100644 index 0000000..c918bc8 --- /dev/null +++ b/UnicodeInformation.Builder/UnicodeInformation.Builder.csproj @@ -0,0 +1,81 @@ + + + + + Debug + AnyCPU + {8DFDEE6C-4F0D-4DE1-B346-574CB56D2B8B} + Exe + Properties + System.Unicode.Builder + UnicodeInformation.Builder + v4.5 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + + + ..\System.Unicode.snk + + + + + + + + + + + + + + + + + + + + + + + + + System.Unicode.snk + + + + + + {cb722958-a1c4-4121-804b-7d5a671491b1} + UnicodeInformation + + + + + \ No newline at end of file diff --git a/UnicodeInformation.Tests/UnicodeDataManagerTests.cs b/UnicodeInformation.Tests/UnicodeDataManagerTests.cs index f2a9654..0b234e9 100644 --- a/UnicodeInformation.Tests/UnicodeDataManagerTests.cs +++ b/UnicodeInformation.Tests/UnicodeDataManagerTests.cs @@ -4,8 +4,9 @@ using System.Threading.Tasks; using System.Net; using System.IO; using System.IO.Compression; +using System.Unicode.Builder; -namespace UnicodeInformation.Tests +namespace System.Unicode.Tests { [TestClass] public class UnicodeDataManagerTests @@ -36,7 +37,9 @@ namespace UnicodeInformation.Tests { var source = new FileUcdSource(UcdDirectoryName); - await UnicodeDataManager.DownloadAndBuildDataAsync(source); + var data = await UnicodeDataManager.DownloadAndBuildDataAsync(source); + + Assert.AreEqual((int)'\t', data.GetUnicodeData('\t').CodePointRange.FirstCodePoint); } } } diff --git a/UnicodeInformation.Tests/UnicodeInformation.Tests.csproj b/UnicodeInformation.Tests/UnicodeInformation.Tests.csproj index ce75d6d..4faadbb 100644 --- a/UnicodeInformation.Tests/UnicodeInformation.Tests.csproj +++ b/UnicodeInformation.Tests/UnicodeInformation.Tests.csproj @@ -39,12 +39,6 @@ - - ..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll - - - ..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll - @@ -60,19 +54,19 @@ - + + {8dfdee6c-4f0d-4de1-b346-574cb56d2b8b} + UnicodeInformation.Builder + {cb722958-a1c4-4121-804b-7d5a671491b1} UnicodeInformation - - - @@ -93,13 +87,6 @@ - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + System.Unicode.snk + - @@ -52,37 +60,18 @@ - - - - - - - - - ..\packages\Microsoft.Net.Http.2.2.28\lib\portable-net45+win8\System.Net.Http.Extensions.dll - - - ..\packages\Microsoft.Net.Http.2.2.28\lib\portable-net45+win8\System.Net.Http.Primitives.dll - - - - - - -