diff --git a/SharedCode/SharedAssemblyInfo.cs b/SharedCode/SharedAssemblyInfo.cs index 7a5e22fe8..ad02b228a 100644 --- a/SharedCode/SharedAssemblyInfo.cs +++ b/SharedCode/SharedAssemblyInfo.cs @@ -9,7 +9,7 @@ [assembly: AssemblyConfiguration("Release")] #endif -[assembly: AssemblyVersion("2.16.2")] -[assembly: AssemblyFileVersion("2.16.2")] -[assembly: AssemblyInformationalVersion("2.16.2")] +[assembly: AssemblyVersion("3.0.0")] +[assembly: AssemblyFileVersion("3.0.0")] +[assembly: AssemblyInformationalVersion("3.0.0")] [assembly: NeutralResourcesLanguageAttribute("en")] \ No newline at end of file diff --git a/build all.bat b/build all.bat index d51c18924..3e63d83ca 100644 --- a/build all.bat +++ b/build all.bat @@ -2,20 +2,6 @@ set t=%1 if "%1"=="" set t=Build -echo %t% xFunc for .Net 2.0 ... -msbuild "xFunc (Libs for .Net 2.0).sln" /nologo /t:%t% /m /clp:WarningsOnly;ErrorsOnly /p:Configuration=Release -if errorlevel 1 goto end -if errorlevel 0 echo %t% completed! - -echo %t% xFunc for .Net 3.0 ... -msbuild "xFunc (Libs for .Net 3.0).sln" /nologo /t:%t% /m /clp:WarningsOnly;ErrorsOnly /p:Configuration=Release -if errorlevel 1 goto end -if errorlevel 0 echo %t% completed! - -echo %t% xFunc for .Net 3.5 ... -msbuild "xFunc (Libs for .Net 3.5).sln" /nologo /t:%t% /m /clp:WarningsOnly;ErrorsOnly /p:Configuration=Release -if errorlevel 1 goto end -if errorlevel 0 echo %t% completed! echo %t% xFunc for .Net 4.0 ... msbuild "xFunc (Libs for .Net 4.0).sln" /nologo /t:%t% /m /clp:WarningsOnly;ErrorsOnly /p:Configuration=Release @@ -41,7 +27,6 @@ if errorlevel 0 echo %t% completed! echo Remove temp files. rmdir "xFunc/obj" /s /q -rmdir "xFunc.Logics/obj" /s /q rmdir "xFunc.Maths/obj" /s /q rmdir "xFunc.Test/obj" /s /q rmdir "xFunc.UnitConverters/obj" /s /q diff --git a/xFunc (Libs for .Net 2.0).sln b/xFunc (Libs for .Net 2.0).sln deleted file mode 100644 index 286f6e135..000000000 --- a/xFunc (Libs for .Net 2.0).sln +++ /dev/null @@ -1,48 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Tests (.Net 2.0)", "xFunc.Test\xFunc.Tests (.Net 2.0).csproj", "{E762246C-21B2-47D9-9D80-54E9E0ED3150}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{716F4D54-B652-4140-9275-5CEA8054C7B2}" - ProjectSection(SolutionItems) = preProject - SharedCode\SharedAssemblyInfo.cs = SharedCode\SharedAssemblyInfo.cs - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Maths (.Net 2.0)", "xFunc.Maths\xFunc.Maths (.Net 2.0).csproj", "{91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Logics (.Net 2.0)", "xFunc.Logics\xFunc.Logics (.Net 2.0).csproj", "{DFC61417-F3CC-47D5-B2DE-4029BE939A4C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.UnitConverters (.Net 2.0)", "xFunc.UnitConverters\xFunc.UnitConverters (.Net 2.0).csproj", "{2ECAAD28-E0CE-40BE-8EB0-0D055C908133}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Release|Any CPU.Build.0 = Release|Any CPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.Build.0 = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.Build.0 = Release|Any CPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(TestCaseManagementSettings) = postSolution - CategoryFile = xFunc.vsmdi - EndGlobalSection -EndGlobal diff --git a/xFunc (Libs for .Net 3.0).sln b/xFunc (Libs for .Net 3.0).sln deleted file mode 100644 index 3ce878f81..000000000 --- a/xFunc (Libs for .Net 3.0).sln +++ /dev/null @@ -1,48 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Tests (.Net 3.0)", "xFunc.Test\xFunc.Tests (.Net 3.0).csproj", "{E762246C-21B2-47D9-9D80-54E9E0ED3150}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{716F4D54-B652-4140-9275-5CEA8054C7B2}" - ProjectSection(SolutionItems) = preProject - SharedCode\SharedAssemblyInfo.cs = SharedCode\SharedAssemblyInfo.cs - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Maths (.Net 3.0)", "xFunc.Maths\xFunc.Maths (.Net 3.0).csproj", "{91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Logics (.Net 3.0)", "xFunc.Logics\xFunc.Logics (.Net 3.0).csproj", "{DFC61417-F3CC-47D5-B2DE-4029BE939A4C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.UnitConverters (.Net 3.0)", "xFunc.UnitConverters\xFunc.UnitConverters (.Net 3.0).csproj", "{2ECAAD28-E0CE-40BE-8EB0-0D055C908133}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Release|Any CPU.Build.0 = Release|Any CPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.Build.0 = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.Build.0 = Release|Any CPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(TestCaseManagementSettings) = postSolution - CategoryFile = xFunc.vsmdi - EndGlobalSection -EndGlobal diff --git a/xFunc (Libs for .Net 3.5).sln b/xFunc (Libs for .Net 3.5).sln deleted file mode 100644 index b733625d5..000000000 --- a/xFunc (Libs for .Net 3.5).sln +++ /dev/null @@ -1,48 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Tests (.Net 3.5)", "xFunc.Test\xFunc.Tests (.Net 3.5).csproj", "{E762246C-21B2-47D9-9D80-54E9E0ED3150}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{716F4D54-B652-4140-9275-5CEA8054C7B2}" - ProjectSection(SolutionItems) = preProject - SharedCode\SharedAssemblyInfo.cs = SharedCode\SharedAssemblyInfo.cs - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Maths (.Net 3.5)", "xFunc.Maths\xFunc.Maths (.Net 3.5).csproj", "{91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Logics (.Net 3.5)", "xFunc.Logics\xFunc.Logics (.Net 3.5).csproj", "{DFC61417-F3CC-47D5-B2DE-4029BE939A4C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.UnitConverters (.Net 3.5)", "xFunc.UnitConverters\xFunc.UnitConverters (.Net 3.5).csproj", "{2ECAAD28-E0CE-40BE-8EB0-0D055C908133}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Release|Any CPU.Build.0 = Release|Any CPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.Build.0 = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.Build.0 = Release|Any CPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(TestCaseManagementSettings) = postSolution - CategoryFile = xFunc.vsmdi - EndGlobalSection -EndGlobal diff --git a/xFunc (Libs for .Net 4.0).sln b/xFunc (Libs for .Net 4.0).sln index 8c546d164..e99cd07ee 100644 --- a/xFunc (Libs for .Net 4.0).sln +++ b/xFunc (Libs for .Net 4.0).sln @@ -12,8 +12,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Maths (.Net 4.0)", "xFunc.Maths\xFunc.Maths (.Net 4.0).csproj", "{91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Logics (.Net 4.0)", "xFunc.Logics\xFunc.Logics (.Net 4.0).csproj", "{DFC61417-F3CC-47D5-B2DE-4029BE939A4C}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.UnitConverters (.Net 4.0)", "xFunc.UnitConverters\xFunc.UnitConverters (.Net 4.0).csproj", "{2ECAAD28-E0CE-40BE-8EB0-0D055C908133}" EndProject Global @@ -30,10 +28,6 @@ Global {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Debug|Any CPU.Build.0 = Debug|Any CPU {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.ActiveCfg = Release|Any CPU {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.Build.0 = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.Build.0 = Release|Any CPU {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.Build.0 = Debug|Any CPU {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/xFunc (Libs for .Net 4.5).sln b/xFunc (Libs for .Net 4.5).sln index 236d0c640..b2737e3a5 100644 --- a/xFunc (Libs for .Net 4.5).sln +++ b/xFunc (Libs for .Net 4.5).sln @@ -12,8 +12,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Maths (.Net 4.5)", "xFunc.Maths\xFunc.Maths (.Net 4.5).csproj", "{91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Logics (.Net 4.5)", "xFunc.Logics\xFunc.Logics (.Net 4.5).csproj", "{DFC61417-F3CC-47D5-B2DE-4029BE939A4C}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.UnitConverters (.Net 4.5)", "xFunc.UnitConverters\xFunc.UnitConverters (.Net 4.5).csproj", "{2ECAAD28-E0CE-40BE-8EB0-0D055C908133}" EndProject Global @@ -30,10 +28,6 @@ Global {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Debug|Any CPU.Build.0 = Debug|Any CPU {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.ActiveCfg = Release|Any CPU {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.Build.0 = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.Build.0 = Release|Any CPU {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.Build.0 = Debug|Any CPU {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/xFunc (Libs for .Net 4.5.1).sln b/xFunc (Libs for .Net 4.5.1).sln index 5b8db8503..4cc5ec218 100644 --- a/xFunc (Libs for .Net 4.5.1).sln +++ b/xFunc (Libs for .Net 4.5.1).sln @@ -12,8 +12,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Maths (.Net 4.5.1)", "xFunc.Maths\xFunc.Maths (.Net 4.5.1).csproj", "{91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Logics (.Net 4.5.1)", "xFunc.Logics\xFunc.Logics (.Net 4.5.1).csproj", "{DFC61417-F3CC-47D5-B2DE-4029BE939A4C}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.UnitConverters (.Net 4.5.1)", "xFunc.UnitConverters\xFunc.UnitConverters (.Net 4.5.1).csproj", "{2ECAAD28-E0CE-40BE-8EB0-0D055C908133}" EndProject Global @@ -30,10 +28,6 @@ Global {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Debug|Any CPU.Build.0 = Debug|Any CPU {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.ActiveCfg = Release|Any CPU {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.Build.0 = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.Build.0 = Release|Any CPU {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.Build.0 = Debug|Any CPU {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/xFunc (Libs for Portable).sln b/xFunc (Libs for Portable).sln index f8a31b576..2b70bbd62 100644 --- a/xFunc (Libs for Portable).sln +++ b/xFunc (Libs for Portable).sln @@ -10,8 +10,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Tests (Portable)", "xFunc.Test\xFunc.Tests (Portable).csproj", "{E762246C-21B2-47D9-9D80-54E9E0ED3150}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Logics (Portable)", "xFunc.Logics\xFunc.Logics (Portable).csproj", "{83B0D9FF-8CD7-4BFF-BAC1-CBA217106F67}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Maths (Portable)", "xFunc.Maths\xFunc.Maths (Portable).csproj", "{B3EBDDB0-2F08-4CCC-BEDE-5F26F36B9602}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.UnitConverters (Portable)", "xFunc.UnitConverters\xFunc.UnitConverters (Portable).csproj", "{2ECAAD28-E0CE-40BE-8EB0-0D055C908133}" @@ -26,10 +24,6 @@ Global {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Debug|Any CPU.Build.0 = Debug|Any CPU {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Release|Any CPU.ActiveCfg = Release|Any CPU {E762246C-21B2-47D9-9D80-54E9E0ED3150}.Release|Any CPU.Build.0 = Release|Any CPU - {83B0D9FF-8CD7-4BFF-BAC1-CBA217106F67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {83B0D9FF-8CD7-4BFF-BAC1-CBA217106F67}.Debug|Any CPU.Build.0 = Debug|Any CPU - {83B0D9FF-8CD7-4BFF-BAC1-CBA217106F67}.Release|Any CPU.ActiveCfg = Release|Any CPU - {83B0D9FF-8CD7-4BFF-BAC1-CBA217106F67}.Release|Any CPU.Build.0 = Release|Any CPU {B3EBDDB0-2F08-4CCC-BEDE-5F26F36B9602}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B3EBDDB0-2F08-4CCC-BEDE-5F26F36B9602}.Debug|Any CPU.Build.0 = Debug|Any CPU {B3EBDDB0-2F08-4CCC-BEDE-5F26F36B9602}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/xFunc.Logics/EnumerableExtension.cs b/xFunc.Logics/EnumerableExtension.cs deleted file mode 100644 index 012add7c9..000000000 --- a/xFunc.Logics/EnumerableExtension.cs +++ /dev/null @@ -1,59 +0,0 @@ -#if NET20 || NET30 - -using System; -using System.Collections.Generic; -using xFunc.Logics.Resources; - -namespace System.Runtime.CompilerServices -{ - - [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - internal class ExtensionAttribute : Attribute { } - -} - -namespace xFunc.Logics -{ - - internal delegate V Func(T arg); - - internal static class EnumerableExtention - { - - public static bool Any(this IEnumerable value, Func predicate) - { - if (value == null) - throw new ArgumentNullException("value"); - if (predicate == null) - throw new ArgumentNullException("predicate"); - - foreach (T item in value) - { - if (predicate(item)) - return true; - } - - return false; - } - - public static T First(this IEnumerable value, Func predicate) - { - if (value == null) - throw new ArgumentNullException("value"); - if (predicate == null) - throw new ArgumentNullException("predicate"); - - foreach (T item in value) - { - if (predicate(item)) - return item; - } - - throw new InvalidOperationException(Resource.InvalidInFirst); - } - - } - -} - -#endif \ No newline at end of file diff --git a/xFunc.Logics/Expressions/And.cs b/xFunc.Logics/Expressions/And.cs deleted file mode 100644 index c48715a60..000000000 --- a/xFunc.Logics/Expressions/And.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Represents the AND operation. - /// - public class And : BinaryLogicExpression - { - - /// - /// Initializes a new instance of the class. - /// - /// - internal And() : base(null, null) { } - - /// - /// Initializes a new instance of the class. - /// - /// The left operand. - /// The right operand. - /// - public And(ILogicExpression firstMathExpression, ILogicExpression secondMathExpression) : base(firstMathExpression, secondMathExpression) { } - - /// - /// Converts this expression to the equivalent string. - /// - /// The string that represents this expression. - public override string ToString() - { - return ToString("&"); - } - - /// - /// Calculates this AND expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - public override bool Calculate(LogicParameterCollection parameters) - { - return left.Calculate(parameters) & right.Calculate(parameters); - } - - } - -} diff --git a/xFunc.Logics/Expressions/Assign.cs b/xFunc.Logics/Expressions/Assign.cs deleted file mode 100644 index eb6ca4162..000000000 --- a/xFunc.Logics/Expressions/Assign.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Represents the Assign operation. - /// - public class Assign : ILogicExpression - { - - private Variable variable; - private ILogicExpression value; - - /// - /// Initializes a new instance of the class. - /// - internal Assign() - { - - } - - /// - /// Initializes a new instance of the class. - /// - /// The variable. - /// The value. - public Assign(Variable variable, ILogicExpression value) - { - this.variable = variable; - this.value = value; - } - - /// - /// Returns a that represents this instance. - /// - /// A that represents this instance. - public override string ToString() - { - return string.Format("{0} := {1}", variable, value); - } - - /// - /// Calculates this logical expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - /// - /// is null. - public bool Calculate(LogicParameterCollection parameters) - { - if (parameters == null) - throw new ArgumentNullException("parameters"); - - var localValue = value.Calculate(parameters); - parameters.Add(variable.Name); - parameters[variable.Name] = localValue; - - return false; - } - - /// - /// Gets or sets the variable. - /// - /// The variable. - public Variable Variable - { - get - { - return variable; - } - set - { - variable = value; - } - } - - /// - /// Gets or sets the value. - /// - /// The value. - public ILogicExpression Value - { - get - { - return value; - } - set - { - this.value = value; - } - } - - } - -} diff --git a/xFunc.Logics/Expressions/BinaryLogicExpression.cs b/xFunc.Logics/Expressions/BinaryLogicExpression.cs deleted file mode 100644 index e3fdccb2f..000000000 --- a/xFunc.Logics/Expressions/BinaryLogicExpression.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// The base class for binary operations. - /// - public abstract class BinaryLogicExpression : ILogicExpression - { - - /// - /// The left (first) operand. - /// - protected ILogicExpression left; - /// - /// The right (second) operand. - /// - protected ILogicExpression right; - - /// - /// Initializes a new instance of the class. - /// - /// The first (left) operand. - /// The second (right) operand. - protected BinaryLogicExpression(ILogicExpression left, ILogicExpression right) - { - this.left = left; - this.right = right; - } - - /// - /// Returns a that represents this instance. - /// - /// The operand. - /// A that represents this instance. - protected string ToString(string operand) - { - string first; - string second; - - if (left is Variable || left is Const) - first = left.ToString(); - else - first = "(" + left + ")"; - - if (right is Variable || right is Const) - second = right.ToString(); - else - second = "(" + right + ")"; - - return first + " " + operand + " " + second; - } - - /// - /// Calculates this logical expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - /// - public abstract bool Calculate(LogicParameterCollection parameters); - - /// - /// Gets or sets the first (left) operand. - /// - /// The first (left) operand. - public ILogicExpression Left - { - get - { - return left; - } - set - { - left = value; - } - } - - /// - /// Gets or sets the second (right) operand. - /// - /// The second (right) operand. - public ILogicExpression Right - { - get - { - return right; - } - set - { - right = value; - } - } - - } - -} diff --git a/xFunc.Logics/Expressions/Const.cs b/xFunc.Logics/Expressions/Const.cs deleted file mode 100644 index 2d5fdd8b3..000000000 --- a/xFunc.Logics/Expressions/Const.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Reprenents True or False. - /// - public class Const : ILogicExpression - { - - private bool value; - - /// - /// Initializes a new instance of the class. - /// - internal Const() - { - - } - - /// - /// Initializes a new instance of the class. - /// - /// The value of constant. - public Const(bool value) - { - this.value = value; - } - - /// - /// Returns a that represents this instance. - /// - /// A that represents this instance. - public override string ToString() - { - return value.ToString(); - } - - /// - /// Calculates this logical expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - /// - public bool Calculate(LogicParameterCollection parameters) - { - return value; - } - - } - -} diff --git a/xFunc.Logics/Expressions/Equality.cs b/xFunc.Logics/Expressions/Equality.cs deleted file mode 100644 index 6a3f92853..000000000 --- a/xFunc.Logics/Expressions/Equality.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Represents the Equality operation. - /// - public class Equality : BinaryLogicExpression - { - - /// - /// Initializes a new instance of the class. - /// - internal Equality() - : base(null, null) - { - - } - - /// - /// Initializes a new instance of the class. - /// - /// The first (left) operand. - /// The second (right) operand. - public Equality(ILogicExpression firstOperand, ILogicExpression secondOperand) - : base(firstOperand, secondOperand) - { - - } - - /// - /// Returns a that represents this instance. - /// - /// A that represents this instance. - public override string ToString() - { - return ToString("<->"); - } - - /// - /// Calculates this logical expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - /// - public override bool Calculate(LogicParameterCollection parameters) - { - return (left.Calculate(parameters) & right.Calculate(parameters)) | (!left.Calculate(parameters) & !right.Calculate(parameters)); - } - - } - -} diff --git a/xFunc.Logics/Expressions/ILogicExpression.cs b/xFunc.Logics/Expressions/ILogicExpression.cs deleted file mode 100644 index 2306dc711..000000000 --- a/xFunc.Logics/Expressions/ILogicExpression.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Defines methods to calculate logical expressions. - /// - public interface ILogicExpression - { - - /// - /// Calculates this logical expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - /// - bool Calculate(LogicParameterCollection parameters); - - } - -} diff --git a/xFunc.Logics/Expressions/Implication.cs b/xFunc.Logics/Expressions/Implication.cs deleted file mode 100644 index 8a6ec4b02..000000000 --- a/xFunc.Logics/Expressions/Implication.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Represents the Implication operation. - /// - public class Implication : BinaryLogicExpression - { - - /// - /// Initializes a new instance of the class. - /// - internal Implication() - : base(null, null) - { - - } - - /// - /// Initializes a new instance of the class. - /// - /// The first (left) operand. - /// The second (right) operand. - public Implication(ILogicExpression firstOperand, ILogicExpression secondOperand) - : base(firstOperand, secondOperand) - { - - } - - /// - /// Returns a that represents this instance. - /// - /// A that represents this instance. - public override string ToString() - { - return ToString("->"); - } - - /// - /// Calculates this logical expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - /// - public override bool Calculate(LogicParameterCollection parameters) - { - return !left.Calculate(parameters) | right.Calculate(parameters); - } - - } - -} diff --git a/xFunc.Logics/Expressions/LogicParameterCollection.cs b/xFunc.Logics/Expressions/LogicParameterCollection.cs deleted file mode 100644 index ab61ced26..000000000 --- a/xFunc.Logics/Expressions/LogicParameterCollection.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; -using System.Collections.Generic; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Collection of logic variables. - /// - public class LogicParameterCollection : List - { - - private int bits; - - /// - /// Initializes a new instance of the class. - /// - public LogicParameterCollection() { } - - /// - /// Initializes a new instance of the class. - /// - /// The variables. - public LogicParameterCollection(IEnumerable vars) : base(vars) { } - - /// - /// Gets or sets the value of specified variable. - /// - /// - /// The value of variable. - /// - /// The variable. - /// The value of variable. - /// The collection does not have this variable. - public bool this[string variable] - { - get - { - if (!Contains(variable)) - throw new KeyNotFoundException(); - - int index = 1 << Count - IndexOf(variable) - 1; - - return (bits & index) == index; - } - set - { - if (!Contains(variable)) - base.Add(variable); - - int index = 1 << Count - IndexOf(variable) - 1; - - if (((bits & index) == index) != value) - { - if (value) - { - bits |= index; - } - else - { - if ((bits & index) == index) - bits ^= index; - } - } - } - } - - /// - /// Adds the specified variable. - /// - /// The variable. - public new void Add(string character) - { - bits <<= Count; - base.Add(character); - } - - /// - /// Removes the specified variable. - /// - /// The variable. - public new void Remove(string character) - { - bits >>= Count; - base.Remove(character); - } - - /// - /// Gets or sets the bits. - /// - /// - /// The bits. - /// - public int Bits - { - get { return bits; } - set { bits = value; } - } - - } - -} diff --git a/xFunc.Logics/Expressions/NAnd.cs b/xFunc.Logics/Expressions/NAnd.cs deleted file mode 100644 index dfb91fb8b..000000000 --- a/xFunc.Logics/Expressions/NAnd.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Represents the NAnd operation. - /// - public class NAnd : BinaryLogicExpression - { - - /// - /// Initializes a new instance of the class. - /// - internal NAnd() - : base(null, null) - { - - } - - /// - /// Initializes a new instance of the class. - /// - /// The first (left) operand. - /// The second (right) operand. - public NAnd(ILogicExpression firstOperand, ILogicExpression secondOperand) - : base(firstOperand, secondOperand) - { - - } - - /// - /// Returns a that represents this instance. - /// - /// A that represents this instance. - public override string ToString() - { - return ToString("↑"); - } - - /// - /// Calculates this logical expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - /// - public override bool Calculate(LogicParameterCollection parameters) - { - return !(left.Calculate(parameters) & right.Calculate(parameters)); - } - - } - -} diff --git a/xFunc.Logics/Expressions/NOr.cs b/xFunc.Logics/Expressions/NOr.cs deleted file mode 100644 index d5b6052aa..000000000 --- a/xFunc.Logics/Expressions/NOr.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Represents the NOr operation. - /// - public class NOr : BinaryLogicExpression - { - - /// - /// Initializes a new instance of the class. - /// - internal NOr() - : base(null, null) - { - - } - - /// - /// Initializes a new instance of the class. - /// - /// The first (left) operand. - /// The second (right) operand. - public NOr(ILogicExpression firstOperand, ILogicExpression secondOperand) - : base(firstOperand, secondOperand) - { - - } - - /// - /// Returns a that represents this instance. - /// - /// A that represents this instance. - public override string ToString() - { - return ToString("↓"); - } - - /// - /// Calculates this logical expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - /// - public override bool Calculate(LogicParameterCollection parameters) - { - return !(left.Calculate(parameters) | right.Calculate(parameters)); - } - - } - -} diff --git a/xFunc.Logics/Expressions/Not.cs b/xFunc.Logics/Expressions/Not.cs deleted file mode 100644 index ef73a17f2..000000000 --- a/xFunc.Logics/Expressions/Not.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Represents the Not operation. - /// - public class Not : UnaryLogicExpression - { - - /// - /// Initializes a new instance of the class. - /// - internal Not() - : base(null) - { - - } - - /// - /// Initializes a new instance of the class. - /// - /// The expression. - public Not(ILogicExpression firstMathExpression) - : base(firstMathExpression) - { - - } - - /// - /// Returns a that represents this instance. - /// - /// A that represents this instance. - public override string ToString() - { - return ToString("!"); - } - - /// - /// Calculates this logical expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - /// - public override bool Calculate(LogicParameterCollection parameters) - { - return !argument.Calculate(parameters); - } - - } - -} diff --git a/xFunc.Logics/Expressions/Or.cs b/xFunc.Logics/Expressions/Or.cs deleted file mode 100644 index b4f6896f0..000000000 --- a/xFunc.Logics/Expressions/Or.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Represents the Or operation. - /// - public class Or : BinaryLogicExpression - { - - /// - /// Initializes a new instance of the class. - /// - internal Or() - : base(null, null) - { - - } - - /// - /// Initializes a new instance of the class. - /// - /// The first (left) operand. - /// The second (right) operand. - public Or(ILogicExpression firstOperand, ILogicExpression secondOperand) - : base(firstOperand, secondOperand) - { - - } - - /// - /// Returns a that represents this instance. - /// - /// A that represents this instance. - public override string ToString() - { - return ToString("|"); - } - - /// - /// Calculates this logical expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - /// - public override bool Calculate(LogicParameterCollection parameters) - { - return left.Calculate(parameters) | right.Calculate(parameters); - } - - } - -} diff --git a/xFunc.Logics/Expressions/TruthTable.cs b/xFunc.Logics/Expressions/TruthTable.cs deleted file mode 100644 index 782322684..000000000 --- a/xFunc.Logics/Expressions/TruthTable.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Represents the TruthTable operation. - /// - public class TruthTable : UnaryLogicExpression - { - - /// - /// Initializes a new instance of the class. - /// - internal TruthTable() : base(null) { } - - /// - /// Initializes a new instance of the class. - /// - /// The expression. - public TruthTable(ILogicExpression expression) : base(expression) { } - - /// - /// Always throws . - /// - /// The parameters. - /// - /// Always. - public override bool Calculate(LogicParameterCollection parameters) - { - throw new NotSupportedException(); - } - - } - -} diff --git a/xFunc.Logics/Expressions/UnaryLogicExpression.cs b/xFunc.Logics/Expressions/UnaryLogicExpression.cs deleted file mode 100644 index d0c532c5b..000000000 --- a/xFunc.Logics/Expressions/UnaryLogicExpression.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// The abstract base class that represents the unary operation. - /// - public abstract class UnaryLogicExpression : ILogicExpression - { - - /// - /// The (first) operand. - /// - protected ILogicExpression argument; - - /// - /// Initializes a new instance of the class. - /// - /// The expression. - protected UnaryLogicExpression(ILogicExpression argument) - { - this.argument = argument; - } - - /// - /// Returns a that represents this instance. - /// - /// The operand. - /// A that represents this instance. - protected string ToString(string operand) - { - if (argument is Variable) - return string.Format("{0}{1}", operand, argument); - - return string.Format("{0}({1})", operand, argument); - } - - /// - /// Calculates this logical expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - /// - public abstract bool Calculate(LogicParameterCollection parameters); - - /// - /// Gets or sets the expression. - /// - /// The expression. - public ILogicExpression Argument - { - get - { - return argument; - } - set - { - argument = value; - } - } - - } - -} diff --git a/xFunc.Logics/Expressions/Undefine.cs b/xFunc.Logics/Expressions/Undefine.cs deleted file mode 100644 index 5145974c2..000000000 --- a/xFunc.Logics/Expressions/Undefine.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Represents the Undefine operation. - /// - public class Undefine : ILogicExpression - { - - private Variable variable; - - /// - /// Initializes a new instance of the class. - /// - internal Undefine() - : this(null) - { - - } - - /// - /// Initializes a new instance of the class. - /// - /// The variable. - public Undefine(Variable variable) - { - this.variable = variable; - } - - /// - /// Calculates this logical expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - /// - /// is null. - public bool Calculate(LogicParameterCollection parameters) - { - if (parameters == null) - throw new ArgumentNullException("parameters"); - - parameters.Remove(variable.Name); - - return false; - } - - /// - /// Gets or sets the variable. - /// - /// The variable. - public Variable Variable - { - get - { - return variable; - } - set - { - variable = value; - } - } - - } - -} diff --git a/xFunc.Logics/Expressions/Variable.cs b/xFunc.Logics/Expressions/Variable.cs deleted file mode 100644 index c6af08264..000000000 --- a/xFunc.Logics/Expressions/Variable.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Represents the Variable expression. - /// - public class Variable : ILogicExpression - { - - private string variable; - - /// - /// Initializes a new instance of the class. - /// - /// The name of variable. - public Variable(string variable) - { - this.variable = variable; - } - - /// - /// Returns a that represents this instance. - /// - /// A that represents this instance. - public override string ToString() - { - return variable.ToString(); - } - - /// - /// Calculates this logical expression. - /// - /// A collection of variables that are used in the expression. - /// A result of the calculation. - /// - /// is null. - public bool Calculate(LogicParameterCollection parameters) - { - if (parameters == null) - throw new ArgumentNullException("parameters"); - - return parameters[variable]; - } - - /// - /// Gets the name of variable. - /// - /// The name of variable. - public string Name - { - get - { - return variable; - } - } - - } - -} diff --git a/xFunc.Logics/Expressions/XOr.cs b/xFunc.Logics/Expressions/XOr.cs deleted file mode 100644 index afad711b4..000000000 --- a/xFunc.Logics/Expressions/XOr.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics.Expressions -{ - - /// - /// Represents the XOr operation. - /// - public class XOr : BinaryLogicExpression - { - - /// - /// Initializes a new instance of the class. - /// - internal XOr() - : base(null, null) - { - - } - - /// - /// Initializes a new instance of the class. - /// - /// The first (left) operand. - /// The second (right) operand. - public XOr(ILogicExpression firstOperand, ILogicExpression secondOperand) - : base(firstOperand, secondOperand) - { - - } - - /// - /// Returns a that represents this instance. - /// - /// A that represents this instance. - public override string ToString() - { - return ToString("⊕"); - } - - /// - /// Calculates this expression. - /// - /// The parameters. - /// A result of calculation. - public override bool Calculate(LogicParameterCollection parameters) - { - return !(left.Calculate(parameters) & right.Calculate(parameters)) & (left.Calculate(parameters) | right.Calculate(parameters)); - } - - } - -} diff --git a/xFunc.Logics/ILexer.cs b/xFunc.Logics/ILexer.cs deleted file mode 100644 index 5bccf22b3..000000000 --- a/xFunc.Logics/ILexer.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; -using System.Collections.Generic; - -namespace xFunc.Logics -{ - - /// - /// The interface for logical lexer. - /// - public interface ILexer - { - - /// - /// Converts the string into a sequence of tokens. - /// - /// The string that contains the functions and operators. - /// The sequence of tokens. - IEnumerable Tokenize(string function); - - } - -} diff --git a/xFunc.Logics/LogicLexer.cs b/xFunc.Logics/LogicLexer.cs deleted file mode 100644 index 511667cd2..000000000 --- a/xFunc.Logics/LogicLexer.cs +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; -using System.Collections.Generic; -#if NET35_OR_GREATER || PORTABLE -using System.Linq; -#endif -using xFunc.Logics.Resources; - -namespace xFunc.Logics -{ - - /// - /// The lexer for logical expressions. - /// - public class LogicLexer : ILexer - { - -#if NET35_OR_GREATER || PORTABLE - private readonly HashSet supportedOp; -#elif NET20_OR_GREATER - private readonly List supportedOp; -#endif - - /// - /// Initializes a new instance of the class. - /// - public LogicLexer() - { -#if NET35_OR_GREATER || PORTABLE - supportedOp = new HashSet - { - "not", "and", "or", "xor", "nand", "nor", "impl", "eq" - }; -#elif NET20_OR_GREATER - supportedOp = new List - { - "not", "and", "or", "xor", "nand", "nor", "impl", "eq" - }; -#endif - } - - private bool IsBalanced(string str) - { - int brackets = 0; - - foreach (var item in str) - { - if (item == '(') brackets++; - else if (item == ')') brackets--; - - if (brackets < 0) - return false; - } - - return brackets == 0; - } - - /// - /// Converts the string into a sequence of tokens. - /// - /// The string that contains the functions and operators. - /// The sequence of tokens. - public IEnumerable Tokenize(string function) - { -#if NET40_OR_GREATER || PORTABLE - if (string.IsNullOrWhiteSpace(function)) -#elif NET20_OR_GREATER - if (StringExtention.IsNullOrWhiteSpace(function)) -#endif - throw new ArgumentNullException("function", Resource.NotSpecifiedFunction); - - function = function.ToLower().Replace(" ", ""); - if (!IsBalanced(function)) - throw new LogicLexerException(Resource.NotBalanced); - var tokens = new List(); - - for (int i = 0; i < function.Length; ) - { - char letter = function[i]; - var token = new LogicToken(); - if (letter == '(') - { - token.Type = LogicTokenType.OpenBracket; - } - else if (letter == ')') - { - token.Type = LogicTokenType.CloseBracket; - } - else if (letter == '!') - { - token.Type = LogicTokenType.Not; - } - else if (letter == '&') - { - token.Type = LogicTokenType.And; - } - else if (letter == '|') - { - token.Type = LogicTokenType.Or; - } - else if ((letter == '-' || letter == '=') && (i + 1 < function.Length && function[i + 1] == '>')) - { - token.Type = LogicTokenType.Implication; - tokens.Add(token); - i += 2; - - continue; - } - else if (letter == '<' && (i + 1 <= function.Length && (function[i + 1] == '=' || function[i + 1] == '-')) && (i + 2 <= function.Length && function[i + 2] == '>')) - { - token.Type = LogicTokenType.Equality; - tokens.Add(token); - i += 3; - - continue; - } - else if (letter == '^') - { - token.Type = LogicTokenType.XOr; - } - else if (letter == ':' && i + 1 < function.Length && function[i + 1] == '=') - { - token.Type = LogicTokenType.Assign; - tokens.Add(token); - i += 2; - - continue; - } - else if (char.IsLetter(letter)) - { - var sub = function.Substring(i); - if (sub.StartsWith("true")) - { - token.Type = LogicTokenType.True; - tokens.Add(token); - i += 4; - - continue; - } - if (sub.StartsWith("false")) - { - token.Type = LogicTokenType.False; - tokens.Add(token); - i += 5; - - continue; - } - if (sub.StartsWith("not(")) - { - token.Type = LogicTokenType.Not; - tokens.Add(token); - i += 3; - - continue; - } - if (sub.StartsWith("or")) - { - token.Type = LogicTokenType.Or; - tokens.Add(token); - i += 2; - - continue; - } - if (sub.StartsWith("and")) - { - token.Type = LogicTokenType.And; - tokens.Add(token); - i += 3; - - continue; - } - if (sub.StartsWith("impl")) - { - token.Type = LogicTokenType.Implication; - tokens.Add(token); - i += 4; - - continue; - } - if (sub.StartsWith("eq")) - { - token.Type = LogicTokenType.Equality; - tokens.Add(token); - i += 2; - - continue; - } - if (sub.StartsWith("nor")) - { - token.Type = LogicTokenType.NOr; - tokens.Add(token); - i += 3; - - continue; - } - if (sub.StartsWith("nand")) - { - token.Type = LogicTokenType.NAnd; - tokens.Add(token); - i += 4; - - continue; - } - if (sub.StartsWith("xor")) - { - token.Type = LogicTokenType.XOr; - tokens.Add(token); - i += 3; - - continue; - } - if (sub.StartsWith("table(")) - { - token.Type = LogicTokenType.TruthTable; - tokens.Add(token); - i += 5; - - continue; - } - if (sub.StartsWith("undef(")) - { - token.Type = LogicTokenType.Undefine; - tokens.Add(token); - i += 5; - - continue; - } - - if (letter == 't') - { - token.Type = LogicTokenType.True; - tokens.Add(token); - i++; - - continue; - } - if (letter == 'f') - { - token.Type = LogicTokenType.False; - tokens.Add(token); - i++; - - continue; - } - - token.Type = LogicTokenType.Variable; - int length = 1; - - for (int j = i + 1; j < function.Length && char.IsLetter(function[j]) && !supportedOp.Any(s => function.Substring(j).StartsWith(s)); j++, length++) ; - token.Variable = function.Substring(i, length); - tokens.Add(token); - - i += length; - - continue; - } - else - { - throw new LogicLexerException(string.Format(Resource.NotSupportedSymbol, letter)); - } - - tokens.Add(token); - i++; - } - - return tokens; - } - - } - -} diff --git a/xFunc.Logics/LogicLexerException.cs b/xFunc.Logics/LogicLexerException.cs deleted file mode 100644 index f7c81e074..000000000 --- a/xFunc.Logics/LogicLexerException.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; -#if !PORTABLE -using System.Runtime.Serialization; -#endif - -namespace xFunc.Logics -{ - - /// - /// The exception that is thrown in . - /// -#if !PORTABLE - [Serializable] -#endif - public class LogicLexerException : Exception - { - - /// - /// Initializes a new instance of the class. - /// - public LogicLexerException() { } - - /// - /// Initializes a new instance of the class with a specified error message. - /// - /// A that describes the error. - public LogicLexerException(string message) : base(message) { } - - /// - /// Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. - /// - /// A that describes the error. - /// The exception that is the cause of the current exception. - public LogicLexerException(string message, Exception inner) : base(message, inner) { } - -#if !PORTABLE - /// - /// Initializes a new instance of the class with serialized data. - /// - /// The object that holds the serialized object data. - /// The contextual information about the source or destination. - protected LogicLexerException(SerializationInfo info, StreamingContext context) : base(info, context) { } -#endif - - } - -} \ No newline at end of file diff --git a/xFunc.Logics/LogicParser.cs b/xFunc.Logics/LogicParser.cs deleted file mode 100644 index fd47f9ac9..000000000 --- a/xFunc.Logics/LogicParser.cs +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; -using System.Collections.Generic; -#if NET35_OR_GREATER || PORTABLE -using System.Linq; -#endif -using xFunc.Logics.Expressions; -using xFunc.Logics.Resources; - -namespace xFunc.Logics -{ - - /// - /// The parser for logical expressions. - /// - public class LogicParser - { - - private ILexer lexer; - - private string lastFunc = string.Empty; - private ILogicExpression logicExpression; - - /// - /// Initializes a new instance of the class. - /// - public LogicParser() - : this(new LogicLexer()) - { - - } - - /// - /// Initializes a new instance of the class. - /// - /// The lexer. - public LogicParser(ILexer lexer) - { - this.lexer = lexer; - } - - /// - /// Parses the specified function. - /// - /// The function. - /// The parsed expression. - /// is null. - /// Error while parsing. - public ILogicExpression Parse(string function) - { -#if NET40_OR_GREATER || PORTABLE - if (string.IsNullOrWhiteSpace(function)) -#elif NET20_OR_GREATER - if (StringExtention.IsNullOrWhiteSpace(function)) -#endif - throw new ArgumentNullException("function"); - - if (function != lastFunc) - { - IEnumerable tokens = lexer.Tokenize(function); - IEnumerable rpn = ConvertToReversePolishNotation(tokens); - IEnumerable expressions = ConvertTokensToExpression(rpn); - - Stack stack = new Stack(); - foreach (var expression in expressions) - { - if (expression is Variable || expression is Const) - { - stack.Push(expression); - } - else if (expression is UnaryLogicExpression) - { - UnaryLogicExpression unaryLogicExp = expression as UnaryLogicExpression; - unaryLogicExp.Argument = stack.Pop(); - - stack.Push(unaryLogicExp); - } - else if (expression is BinaryLogicExpression) - { - BinaryLogicExpression binLoginExp = expression as BinaryLogicExpression; - binLoginExp.Right = stack.Pop(); - binLoginExp.Left = stack.Pop(); - - stack.Push(binLoginExp); - } - else if (expression is Assign) - { - Assign assign = expression as Assign; - assign.Value = stack.Pop(); - - if (!(stack.Peek() is Variable)) - throw new LogicParserException(Resource.InvalidExpression); - - assign.Variable = (Variable)stack.Pop(); - - stack.Push(assign); - } - else if (expression is Undefine) - { - Undefine undef = expression as Undefine; - - if (!(stack.Peek() is Variable)) - throw new LogicParserException(Resource.InvalidExpression); - - undef.Variable = (Variable)stack.Pop(); - - stack.Push(undef); - } - else - { - throw new LogicParserException(Resource.UnexpectedError); - } - } - - lastFunc = function; - logicExpression = stack.Pop(); - } - - return logicExpression; - } - - /// - /// Gets parameters of expression. - /// - /// The function. - /// A collection of parameters. - public LogicParameterCollection GetLogicParameters(string function) - { -#if NET40_OR_GREATER - HashSet c = new HashSet(from t in lexer.Tokenize(function).AsParallel() - where t.Type == LogicTokenType.Variable - orderby t.Variable - select t.Variable); -#elif NET35 || PORTABLE - HashSet c = new HashSet(from t in lexer.Tokenize(function) - where t.Type == LogicTokenType.Variable - orderby t.Variable - select t.Variable); -#elif NET20_OR_GREATER - var tokens = lexer.Tokenize(function); - List c = new List(); - - foreach (var token in tokens) - if (token.Type == LogicTokenType.Variable && !c.Contains(token.Variable)) - c.Add(token.Variable); - c.Sort(StringComparer.InvariantCulture); -#endif - - return new LogicParameterCollection(c); - } - - /// - /// Converts the logic expression to collection. - /// - /// The expression. - /// - /// The variable is null. - public IEnumerable ConvertLogicExpressionToCollection(ILogicExpression expression) - { - if (expression == null) - throw new ArgumentNullException("expression"); - - List collection = new List(); - ConvertToColletion(expression, collection); - - return collection; - } - - private void ConvertToColletion(ILogicExpression expression, List collection) - { - if (expression is UnaryLogicExpression) - { - UnaryLogicExpression un = expression as UnaryLogicExpression; - ConvertToColletion(un.Argument, collection); - } - else if (expression is BinaryLogicExpression) - { - BinaryLogicExpression bin = expression as BinaryLogicExpression; - ConvertToColletion(bin.Left, collection); - ConvertToColletion(bin.Right, collection); - } - else if (expression is Variable) - { - return; - } - - collection.Add(expression); - } - - private IEnumerable ConvertToReversePolishNotation(IEnumerable tokens) - { - List output = new List(); - Stack stack = new Stack(); - - foreach (var token in tokens) - { - LogicToken stackToken; - if (token.Type == LogicTokenType.OpenBracket) - { - stack.Push(token); - } - else if (token.Type == LogicTokenType.CloseBracket) - { - stackToken = stack.Pop(); - while (stackToken.Type != LogicTokenType.OpenBracket) - { - output.Add(stackToken); - stackToken = stack.Pop(); - } - } - else if (token.Type == LogicTokenType.Variable) - { - output.Add(token); - } - else - { - while (stack.Count != 0 && (stackToken = stack.Peek()).Type >= token.Type) - { - if (stackToken.Type == LogicTokenType.OpenBracket) - break; - output.Add(stack.Pop()); - } - - stack.Push(token); - } - } - if (stack.Count != 0) - { - output.AddRange(stack); - } - - return output; - } - - private IEnumerable ConvertTokensToExpression(IEnumerable tokens) - { - List preOutput = new List(); - - foreach (var token in tokens) - { - switch (token.Type) - { - case LogicTokenType.Not: - preOutput.Add(new Not()); - break; - case LogicTokenType.And: - preOutput.Add(new And()); - break; - case LogicTokenType.Or: - preOutput.Add(new Or()); - break; - case LogicTokenType.Implication: - preOutput.Add(new Implication()); - break; - case LogicTokenType.Equality: - preOutput.Add(new Equality()); - break; - case LogicTokenType.NAnd: - preOutput.Add(new NAnd()); - break; - case LogicTokenType.NOr: - preOutput.Add(new NOr()); - break; - case LogicTokenType.XOr: - preOutput.Add(new XOr()); - break; - case LogicTokenType.Assign: - preOutput.Add(new Assign()); - break; - case LogicTokenType.Undefine: - preOutput.Add(new Undefine()); - break; - case LogicTokenType.TruthTable: - preOutput.Add(new TruthTable()); - break; - case LogicTokenType.True: - preOutput.Add(new Const(true)); - break; - case LogicTokenType.False: - preOutput.Add(new Const(false)); - break; - case LogicTokenType.Variable: - preOutput.Add(new Variable(token.Variable)); - break; - default: - throw new LogicParserException(Resource.NotSupportedToken); - } - } - - return preOutput; - } - - } - -} diff --git a/xFunc.Logics/LogicParserException.cs b/xFunc.Logics/LogicParserException.cs deleted file mode 100644 index c6172ef63..000000000 --- a/xFunc.Logics/LogicParserException.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; -#if !PORTABLE -using System.Runtime.Serialization; -#endif - -namespace xFunc.Logics -{ - - /// - /// The exception that is thrown in . - /// -#if !PORTABLE - [Serializable] -#endif - public class LogicParserException : Exception - { - - /// - /// Initializes a new instance of the class. - /// - public LogicParserException() { } - - /// - /// Initializes a new instance of the class with a specified error message. - /// - /// A that describes the error. - public LogicParserException(string message) : base(message) { } - - /// - /// Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. - /// - /// A that describes the error. - /// The exception that is the cause of the current exception. - public LogicParserException(string message, Exception inner) : base(message, inner) { } - -#if !PORTABLE - /// - /// Initializes a new instance of the class with serialized data. - /// - /// The object that holds the serialized object data. - /// The contextual information about the source or destination. - protected LogicParserException(SerializationInfo info, StreamingContext context) : base(info, context) { } -#endif - - } - -} diff --git a/xFunc.Logics/LogicToken.cs b/xFunc.Logics/LogicToken.cs deleted file mode 100644 index ba0fbe5d6..000000000 --- a/xFunc.Logics/LogicToken.cs +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics -{ - - /// - /// Represents a token. - /// - /// - public class LogicToken - { - - private LogicTokenType type; - private string variable; - - /// - /// Initializes a new instance of . - /// - public LogicToken() { } - - /// - /// Initializes a new instance of . - /// - /// A type of token. - /// - public LogicToken(LogicTokenType type) : this(type, string.Empty) { } - - /// - /// Initializes a new instance of and sets the name of variable. - /// - /// A name of variable. - public LogicToken(string variable) : this(LogicTokenType.Variable, variable) { } - - internal LogicToken(LogicTokenType type, string variable) - { - this.type = type; - this.variable = variable; - } - - /// - /// Determines whether the specified object is equal to the current object. - /// - /// The object to compare with the current object. - /// true if the specified object is equal to the current object; otherwise, false. - public override bool Equals(object obj) - { - LogicToken token = obj as LogicToken; - if (token != null && token.Type == type) - { - if (token.Type == LogicTokenType.Variable && token.Variable != variable) - return false; - - return true; - } - - return false; - } - - /// - /// Returns the hash code for this token. - /// - /// A 32-bit signed integer hash code. - public override int GetHashCode() - { - return type.GetHashCode() ^ variable.GetHashCode(); - } - - /// - /// Converts this instance of token into an equivalent string. - /// - /// The string that represents this token. - public override string ToString() - { - if (type == LogicTokenType.Variable) - { - return string.Format("Var: {0}", variable); - } - - return type.ToString(); - } - - /// - /// Get or Set the type of token. - /// - public LogicTokenType Type - { - get - { - return type; - } - set - { - type = value; - } - } - - /// - /// Get or Set the name of variable. - /// - public string Variable - { - get - { - return variable; - } - set - { - variable = value; - } - } - - } - -} diff --git a/xFunc.Logics/LogicTokenType.cs b/xFunc.Logics/LogicTokenType.cs deleted file mode 100644 index a3a299720..000000000 --- a/xFunc.Logics/LogicTokenType.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2012-2015 Dmitry Kischenko -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -using System; - -namespace xFunc.Logics -{ - - /// - /// Describes a type of token. - /// - /// - public enum LogicTokenType - { - - /// - /// := - /// - Assign = 0, - /// - /// undef() - /// - Undefine = 1, - /// - /// ( - /// - OpenBracket = 2, - /// - /// ) - /// - CloseBracket = 3, - - /// - /// ! - /// - Not = 70, - /// - /// & - /// - And = 62, - /// - /// | - /// - Or = 63, - /// - /// -> - /// - Implication = 64, - /// - /// <-> - /// - Equality = 65, - /// - /// ↓ - /// - NOr = 66, - /// - /// ↑ - /// - NAnd = 67, - /// - /// ⊕ - /// - XOr = 68, - - /// - /// table - /// - TruthTable = 74, - /// - /// True. - /// - True = 75, - /// - /// False. - /// - False = 76, - - /// - /// Variable. - /// - Variable = 101 - - } - -} diff --git a/xFunc.Logics/Properties/AssemblyInfo.cs b/xFunc.Logics/Properties/AssemblyInfo.cs deleted file mode 100644 index 5d6b23c19..000000000 --- a/xFunc.Logics/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("xFunc.Logics")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("xFunc.Logics")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -#if !PORTABLE -[assembly: ComVisible(false)] -[assembly: Guid("817c2e5c-5a4a-493b-89ce-57d62f3dd7c5")] -#endif \ No newline at end of file diff --git a/xFunc.Logics/Resources/Resource.Designer.cs b/xFunc.Logics/Resources/Resource.Designer.cs deleted file mode 100644 index 24f0db120..000000000 --- a/xFunc.Logics/Resources/Resource.Designer.cs +++ /dev/null @@ -1,144 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.34209 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace xFunc.Logics.Resources { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resource { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resource() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("xFunc.Logics.Resources.Resource", typeof(Resource).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to An error occurred while parsing the tree.. - /// - internal static string ErrorWhileParsingTree { - get { - return ResourceManager.GetString("ErrorWhileParsingTree", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The expression is invalid.. - /// - internal static string InvalidExpression { - get { - return ResourceManager.GetString("InvalidExpression", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No item satisfied the predicate or the source collection was empty.. - /// - internal static string InvalidInFirst { - get { - return ResourceManager.GetString("InvalidInFirst", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The function has an invalid number of variables.. - /// - internal static string InvalidNumberOfVariables { - get { - return ResourceManager.GetString("InvalidNumberOfVariables", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Brackets are not balanced.. - /// - internal static string NotBalanced { - get { - return ResourceManager.GetString("NotBalanced", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The function is not specified.. - /// - internal static string NotSpecifiedFunction { - get { - return ResourceManager.GetString("NotSpecifiedFunction", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The symbol '{0}' is not supported.. - /// - internal static string NotSupportedSymbol { - get { - return ResourceManager.GetString("NotSupportedSymbol", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The type of token is not supported.. - /// - internal static string NotSupportedToken { - get { - return ResourceManager.GetString("NotSupportedToken", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unexpected error.. - /// - internal static string UnexpectedError { - get { - return ResourceManager.GetString("UnexpectedError", resourceCulture); - } - } - } -} diff --git a/xFunc.Logics/Resources/Resource.resx b/xFunc.Logics/Resources/Resource.resx deleted file mode 100644 index 36977b334..000000000 --- a/xFunc.Logics/Resources/Resource.resx +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - An error occurred while parsing the tree. - - - The expression is invalid. - - - No item satisfied the predicate or the source collection was empty. - - - The function has an invalid number of variables. - - - Brackets are not balanced. - - - The function is not specified. - - - The symbol '{0}' is not supported. - - - The type of token is not supported. - - - Unexpected error. - - \ No newline at end of file diff --git a/xFunc.Logics/Resources/Resource.ru.Designer.cs b/xFunc.Logics/Resources/Resource.ru.Designer.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/xFunc.Logics/Resources/Resource.ru.resx b/xFunc.Logics/Resources/Resource.ru.resx deleted file mode 100644 index 158296b6a..000000000 --- a/xFunc.Logics/Resources/Resource.ru.resx +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - При построении дерева произошла ошибка. - - - Выражение имеет неверный формат. - - - Ни один элемент не удовлетворяет условию предиката или исходная последовательность пуста. - - - Функция имеет неверное количество переменных. - - - Скобки не сбалансированы. - - - Функция не задана. - - - Символ '{0}' не поддерживается программой. - - - Тип токена не подходит. - - - Неожидаемая ошибка. - - \ No newline at end of file diff --git a/xFunc.Logics/Resources/Resource.uk.Designer.cs b/xFunc.Logics/Resources/Resource.uk.Designer.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/xFunc.Logics/Resources/Resource.uk.resx b/xFunc.Logics/Resources/Resource.uk.resx deleted file mode 100644 index 31d973411..000000000 --- a/xFunc.Logics/Resources/Resource.uk.resx +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - При побудові дерева сталася помилка. - - - Вираз має невірний формат. - - - Жоден елемент не задовольняє умові предиката або початкова послідовність порожня. - - - Функція має невірну кількість змінних. - - - Дужки не збалансовані. - - - Функція не задана. - - - Символ '{0}' не підтримується програмою. - - - Тип токена не підходить. - - - Неочікувана помилка. - - \ No newline at end of file diff --git a/xFunc.Logics/StringExtension.cs b/xFunc.Logics/StringExtension.cs deleted file mode 100644 index 8d41e0fbf..000000000 --- a/xFunc.Logics/StringExtension.cs +++ /dev/null @@ -1,25 +0,0 @@ -#if NET20 || NET30 || NET35 - -using System; - -namespace xFunc.Logics -{ - - internal static class StringExtention - { - - public static bool IsNullOrWhiteSpace(string value) - { - if (value != null) - for (int i = 0; i < value.Length; i++) - if (!char.IsWhiteSpace(value[i])) - return false; - - return true; - } - - } - -} - -#endif \ No newline at end of file diff --git a/xFunc.Logics/xFunc.Logics (.Net 2.0).csproj b/xFunc.Logics/xFunc.Logics (.Net 2.0).csproj deleted file mode 100644 index d56baf470..000000000 --- a/xFunc.Logics/xFunc.Logics (.Net 2.0).csproj +++ /dev/null @@ -1,128 +0,0 @@ - - - - - Debug - AnyCPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C} - Library - Properties - xFunc.Logics - xFunc.Logics - v2.0 - 512 - - - - true - full - false - bin\Debug\net20\ - TRACE;DEBUG;NET20;NET20_OR_GREATER - prompt - 4 - - - pdbonly - true - bin\Release\net20\ - TRACE;NET20;NET20_OR_GREATER - prompt - 4 - MinimumRecommendedRules.ruleset - bin\Release\net20\xFunc.Logics.XML - - - true - - - ..\key.pfx - - - - - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resource.resx - True - True - - - True - True - Resource.ru.resx - - - True - True - Resource.uk.resx - - - - - - ResXFileCodeGenerator - Resource.uk.Designer.cs - - - ResXFileCodeGenerator - Resource.Designer.cs - - - ResXFileCodeGenerator - Resource.ru.Designer.cs - - - - - key.pfx - - - LICENSE - PreserveNewest - - - NOTICE - PreserveNewest - - - - - \ No newline at end of file diff --git a/xFunc.Logics/xFunc.Logics (.Net 3.0).csproj b/xFunc.Logics/xFunc.Logics (.Net 3.0).csproj deleted file mode 100644 index 86dd3ad13..000000000 --- a/xFunc.Logics/xFunc.Logics (.Net 3.0).csproj +++ /dev/null @@ -1,128 +0,0 @@ - - - - - Debug - AnyCPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C} - Library - Properties - xFunc.Logics - xFunc.Logics - v3.0 - 512 - - - - true - full - false - bin\Debug\net30\ - TRACE;DEBUG;NET30;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - - - pdbonly - true - bin\Release\net30\ - TRACE;NET30;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - MinimumRecommendedRules.ruleset - bin\Release\net30\xFunc.Logics.XML - - - true - - - ..\key.pfx - - - - - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resource.resx - True - True - - - True - True - Resource.ru.resx - - - True - True - Resource.uk.resx - - - - - - ResXFileCodeGenerator - Resource.uk.Designer.cs - - - ResXFileCodeGenerator - Resource.Designer.cs - - - ResXFileCodeGenerator - Resource.ru.Designer.cs - - - - - key.pfx - - - LICENSE - PreserveNewest - - - NOTICE - PreserveNewest - - - - - \ No newline at end of file diff --git a/xFunc.Logics/xFunc.Logics (.Net 3.5).csproj b/xFunc.Logics/xFunc.Logics (.Net 3.5).csproj deleted file mode 100644 index 97d143f91..000000000 --- a/xFunc.Logics/xFunc.Logics (.Net 3.5).csproj +++ /dev/null @@ -1,129 +0,0 @@ - - - - - Debug - AnyCPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C} - Library - Properties - xFunc.Logics - xFunc.Logics - v3.5 - 512 - - - - true - full - false - bin\Debug\net35\ - TRACE;DEBUG;NET35;NET35_OR_GREATER;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - - - pdbonly - true - bin\Release\net35\ - TRACE;NET35;NET35_OR_GREATER;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - MinimumRecommendedRules.ruleset - bin\Release\net35\xFunc.Logics.XML - - - true - - - ..\key.pfx - - - - - - - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resource.resx - True - True - - - True - True - Resource.ru.resx - - - True - True - Resource.uk.resx - - - - - - ResXFileCodeGenerator - Resource.uk.Designer.cs - - - ResXFileCodeGenerator - Resource.Designer.cs - - - ResXFileCodeGenerator - Resource.ru.Designer.cs - - - - - key.pfx - - - LICENSE - PreserveNewest - - - NOTICE - PreserveNewest - - - - - \ No newline at end of file diff --git a/xFunc.Logics/xFunc.Logics (.Net 4.0).csproj b/xFunc.Logics/xFunc.Logics (.Net 4.0).csproj deleted file mode 100644 index 7b3502fc3..000000000 --- a/xFunc.Logics/xFunc.Logics (.Net 4.0).csproj +++ /dev/null @@ -1,128 +0,0 @@ - - - - - Debug - AnyCPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C} - Library - Properties - xFunc.Logics - xFunc.Logics - v4.0 - 512 - - - true - full - false - bin\Debug\net40\ - TRACE;DEBUG;NET40;NET40_OR_GREATER;NET35_OR_GREATER;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - - - pdbonly - true - bin\Release\net40\ - TRACE;NET40;NET40_OR_GREATER;NET35_OR_GREATER;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - MinimumRecommendedRules.ruleset - bin\Release\net40\xFunc.Logics.XML - - - true - - - ..\key.pfx - - - - - - - - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resource.resx - True - True - - - True - True - Resource.ru.resx - - - True - True - Resource.uk.resx - - - - - ResXFileCodeGenerator - Resource.uk.Designer.cs - - - ResXFileCodeGenerator - Resource.Designer.cs - - - ResXFileCodeGenerator - Resource.ru.Designer.cs - - - - - key.pfx - - - LICENSE - PreserveNewest - - - NOTICE - PreserveNewest - - - - - \ No newline at end of file diff --git a/xFunc.Logics/xFunc.Logics (.Net 4.5).csproj b/xFunc.Logics/xFunc.Logics (.Net 4.5).csproj deleted file mode 100644 index f762e65b9..000000000 --- a/xFunc.Logics/xFunc.Logics (.Net 4.5).csproj +++ /dev/null @@ -1,131 +0,0 @@ - - - - - Debug - AnyCPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C} - Library - Properties - xFunc.Logics - xFunc.Logics - v4.5 - 512 - - - - true - full - false - bin\Debug\net45\ - TRACE;DEBUG;NET45;NET40_OR_GREATER;NET35_OR_GREATER;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - false - - - pdbonly - true - bin\Release\net45\ - TRACE;NET45;NET40_OR_GREATER;NET35_OR_GREATER;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - MinimumRecommendedRules.ruleset - bin\Release\net45\xFunc.Logics.XML - false - - - true - - - ..\key.pfx - - - - - - - - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resource.resx - True - True - - - True - True - Resource.ru.resx - - - True - True - Resource.uk.resx - - - - - ResXFileCodeGenerator - Resource.uk.Designer.cs - - - ResXFileCodeGenerator - Resource.Designer.cs - - - ResXFileCodeGenerator - Resource.ru.Designer.cs - - - - - key.pfx - - - LICENSE - PreserveNewest - - - NOTICE - PreserveNewest - - - - - \ No newline at end of file diff --git a/xFunc.Logics/xFunc.Logics (.Net 4.5.1).csproj b/xFunc.Logics/xFunc.Logics (.Net 4.5.1).csproj deleted file mode 100644 index faeed049f..000000000 --- a/xFunc.Logics/xFunc.Logics (.Net 4.5.1).csproj +++ /dev/null @@ -1,131 +0,0 @@ - - - - - Debug - AnyCPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C} - Library - Properties - xFunc.Logics - xFunc.Logics - v4.5.1 - 512 - - - - true - full - false - bin\Debug\net451\ - TRACE;DEBUG;NET451;NET45;NET45_OR_GREATER;NET40_OR_GREATER;NET35_OR_GREATER;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - false - - - pdbonly - true - bin\Release\net451\ - TRACE;NET451;NET45;NET45_OR_GREATER;NET40_OR_GREATER;NET35_OR_GREATER;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - MinimumRecommendedRules.ruleset - bin\Release\net451\xFunc.Logics.XML - false - - - true - - - ..\key.pfx - - - - - - - - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resource.resx - True - True - - - True - True - Resource.ru.resx - - - True - True - Resource.uk.resx - - - - - ResXFileCodeGenerator - Resource.uk.Designer.cs - - - ResXFileCodeGenerator - Resource.Designer.cs - - - ResXFileCodeGenerator - Resource.ru.Designer.cs - - - - - key.pfx - - - LICENSE - PreserveNewest - - - NOTICE - PreserveNewest - - - - - \ No newline at end of file diff --git a/xFunc.Logics/xFunc.Logics (Portable).csproj b/xFunc.Logics/xFunc.Logics (Portable).csproj deleted file mode 100644 index db925c710..000000000 --- a/xFunc.Logics/xFunc.Logics (Portable).csproj +++ /dev/null @@ -1,155 +0,0 @@ - - - - - 10.0 - Debug - AnyCPU - {83B0D9FF-8CD7-4BFF-BAC1-CBA217106F67} - Library - Properties - xFunc.Logics - xFunc.Logics - v4.0 - Profile136 - 512 - {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - - - 4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\portable\ - DEBUG;TRACE;PORTABLE - prompt - 4 - - - pdbonly - true - bin\Release\portable\ - TRACE;PORTABLE - prompt - 4 - bin\Release\portable\xFunc.Logics.XML - - - true - - - ..\key.pfx - - - - - ResXFileCodeGenerator - Resource.uk.Designer.cs - - - ResXFileCodeGenerator - Resource.Designer.cs - - - ResXFileCodeGenerator - Resource.ru.Designer.cs - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resource.resx - True - True - - - True - True - Resource.ru.resx - - - True - True - Resource.uk.resx - - - - - key.pfx - - - LICENSE - PreserveNewest - - - NOTICE - PreserveNewest - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - - - \ No newline at end of file diff --git a/xFunc.Maths/EnumerableExtension.cs b/xFunc.Maths/EnumerableExtension.cs deleted file mode 100644 index 6d866db1c..000000000 --- a/xFunc.Maths/EnumerableExtension.cs +++ /dev/null @@ -1,235 +0,0 @@ -#if NET20 || NET30 - -using System; -using System.Collections.Generic; -using xFunc.Maths.Resources; - -namespace System.Runtime.CompilerServices -{ - - [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - internal class ExtensionAttribute : Attribute { } - -} - -namespace xFunc.Maths -{ - - internal static class EnumerableExtension - { - - public static TSource Aggregate(this IEnumerable value, Func func) - { - if (value == null) - throw new ArgumentNullException("value"); - if (func == null) - throw new ArgumentNullException("func"); - - using (var enumerator = value.GetEnumerator()) - { - if (!enumerator.MoveNext()) - throw new InvalidOperationException(Resource.NoElementInSource); - - TSource folded = enumerator.Current; - while (enumerator.MoveNext()) - folded = func(folded, enumerator.Current); - return folded; - } - } - - public static TAccumulate Aggregate(this IEnumerable value, TAccumulate seed, Func func) - { - if (value == null) - throw new ArgumentNullException("value"); - if (func == null) - throw new ArgumentNullException("func"); - - TAccumulate folded = seed; - - foreach (var item in value) - folded = func(folded, item); - - return folded; - } - - public static bool Any(this IEnumerable value, Func predicate) - { - if (value == null) - throw new ArgumentNullException("value"); - if (predicate == null) - throw new ArgumentNullException("predicate"); - - foreach (T item in value) - if (predicate(item)) - return true; - - return false; - } - - public static int Count(this IEnumerable value) - { - if (value == null) - throw new ArgumentNullException("value"); - - var collection = value as ICollection; - if (collection != null) - return collection.Count; - - int count = 0; - foreach (var item in value) - count++; - - return count; - } - - public static T First(this IEnumerable value) - { - if (value == null) - throw new ArgumentNullException("value"); - - var list = value as IList; - if (list != null) - { - if (list.Count > 0) - return list[0]; - - throw new InvalidOperationException(Resource.InvalidInFirst); - } - - using (var e = value.GetEnumerator()) - if (e.MoveNext()) - return e.Current; - - throw new InvalidOperationException(Resource.InvalidInFirst); - } - - public static T First(this IEnumerable value, Func predicate) - { - if (value == null) - throw new ArgumentNullException("value"); - if (predicate == null) - throw new ArgumentNullException("predicate"); - - foreach (T item in value) - if (predicate(item)) - return item; - - throw new InvalidOperationException(Resource.InvalidInFirst); - } - - public static T FirstOrDefault(this IEnumerable value) where T : class - { - if (value == null) - throw new ArgumentNullException("value"); - - var list = value as IList; - if (list != null) - { - if (list.Count > 0) - return list[0]; - - return null; - } - - using (var e = value.GetEnumerator()) - if (e.MoveNext()) - return e.Current; - - return null; - } - - public static T FirstOrDefault(this IEnumerable value, Func predicate) where T : class - { - if (value == null) - throw new ArgumentNullException("value"); - if (predicate == null) - throw new ArgumentNullException("predicate"); - - foreach (T item in value) - if (predicate(item)) - return item; - - return null; - } - - public static T LastOrDefault(this IEnumerable value) where T : class - { - if (value == null) - throw new ArgumentNullException("value"); - - var list = value as IList; - if (list != null) - return list.Count > 0 ? list[list.Count - 1] : null; - - using (var e = value.GetEnumerator()) - { - if (!e.MoveNext()) - return null; - - var last = e.Current; - while (e.MoveNext()) - last = e.Current; - - return last; - } - } - - public static IEnumerable Select(this IEnumerable value, Func func) - { - if (value == null) - throw new ArgumentNullException("value"); - if (func == null) - throw new ArgumentNullException("func"); - - foreach (var item in value) - yield return func(item); - } - - public static bool SequenceEqual(this IEnumerable value, IEnumerable obj) - { - if (value == null) - throw new ArgumentNullException("value"); - if (obj == null) - throw new ArgumentNullException("obj"); - - using (IEnumerator first = value.GetEnumerator(), second = obj.GetEnumerator()) - { - do - { - if (!first.MoveNext()) - return !second.MoveNext(); - - if (!second.MoveNext()) - return false; - } - while (first.Current.Equals(second.Current)); - } - - return false; - } - - public static IEnumerable Where(this IEnumerable value, Func predicate) - { - if (value == null) - throw new ArgumentNullException("value"); - if (predicate == null) - throw new ArgumentNullException("predicate"); - - foreach (var item in value) - if (predicate(item)) - yield return item; - } - - public static T[] ToArray(this IEnumerable value) - { - if (value == null) - throw new ArgumentNullException("value"); - - return new List(value).ToArray(); - } - - } - -} - -#endif \ No newline at end of file diff --git a/xFunc.Maths/Expressions/Collections/FunctionCollection.cs b/xFunc.Maths/Expressions/Collections/FunctionCollection.cs index 270a276d7..b35beeab2 100644 --- a/xFunc.Maths/Expressions/Collections/FunctionCollection.cs +++ b/xFunc.Maths/Expressions/Collections/FunctionCollection.cs @@ -14,9 +14,7 @@ // limitations under the License. using System; using System.Collections.Generic; -#if NET35_OR_GREATER || PORTABLE using System.Linq; -#endif #if !PORTABLE using System.Runtime.Serialization; #endif diff --git a/xFunc.Maths/Expressions/Collections/ParameterCollection.cs b/xFunc.Maths/Expressions/Collections/ParameterCollection.cs index 7ac37a8d3..51d08834d 100644 --- a/xFunc.Maths/Expressions/Collections/ParameterCollection.cs +++ b/xFunc.Maths/Expressions/Collections/ParameterCollection.cs @@ -15,9 +15,7 @@ using System; using System.Collections; using System.Collections.Generic; -#if NET35_OR_GREATER || PORTABLE using System.Linq; -#endif using xFunc.Maths.Resources; namespace xFunc.Maths.Expressions.Collections @@ -28,14 +26,9 @@ namespace xFunc.Maths.Expressions.Collections /// public class ParameterCollection : IEnumerable { - -#if NET40_OR_GREATER || PORTABLE + private readonly HashSet consts; private HashSet collection; -#elif NET20_OR_GREATER - private readonly List consts; - private List collection; -#endif /// /// Initializes a new instance of the class. @@ -52,13 +45,8 @@ public ParameterCollection() /// if set to true initialize constants. public ParameterCollection(bool initConsts) { -#if NET40_OR_GREATER || PORTABLE consts = new HashSet(); collection = new HashSet(); -#elif NET20_OR_GREATER - consts = new List(); - collection = new List(); -#endif if (initConsts) InitializeDefaults(); @@ -81,13 +69,8 @@ public ParameterCollection(IEnumerable parameters) /// if set to true initialize constants. public ParameterCollection(IEnumerable parameters, bool initConsts) { -#if NET40_OR_GREATER || PORTABLE consts = new HashSet(); collection = new HashSet(parameters); -#elif NET20_OR_GREATER - consts = new List(); - collection = new List(parameters); -#endif if (initConsts) InitializeDefaults(); @@ -251,11 +234,7 @@ public void Remove(Parameter param) /// The variable is read only. public void Remove(string key) { -#if NET40_OR_GREATER || PORTABLE if (string.IsNullOrWhiteSpace(key)) -#elif NET20_OR_GREATER - if (StringExtension.IsNullOrWhiteSpace(key)) -#endif throw new ArgumentNullException(nameof(key)); var el = collection.FirstOrDefault(p => p.Key == key); diff --git a/xFunc.Maths/Expressions/DifferentParametersExpression.cs b/xFunc.Maths/Expressions/DifferentParametersExpression.cs index 31f294241..43700b3fd 100644 --- a/xFunc.Maths/Expressions/DifferentParametersExpression.cs +++ b/xFunc.Maths/Expressions/DifferentParametersExpression.cs @@ -13,9 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. using System; -#if NET35_OR_GREATER || PORTABLE using System.Linq; -#endif using System.Text; using xFunc.Maths.Resources; diff --git a/xFunc.Maths/Expressions/GCD.cs b/xFunc.Maths/Expressions/GCD.cs index b381309c2..34af6a59f 100644 --- a/xFunc.Maths/Expressions/GCD.cs +++ b/xFunc.Maths/Expressions/GCD.cs @@ -13,9 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. using System; -#if NET35_OR_GREATER || PORTABLE using System.Linq; -#endif namespace xFunc.Maths.Expressions { diff --git a/xFunc.Maths/Expressions/LCM.cs b/xFunc.Maths/Expressions/LCM.cs index 9f289fced..e0a6cf67f 100644 --- a/xFunc.Maths/Expressions/LCM.cs +++ b/xFunc.Maths/Expressions/LCM.cs @@ -13,9 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. using System; -#if NET35_OR_GREATER || PORTABLE using System.Linq; -#endif namespace xFunc.Maths.Expressions { diff --git a/xFunc.Maths/Expressions/Matrices/Matrix.cs b/xFunc.Maths/Expressions/Matrices/Matrix.cs index 800c2d42a..48d59aef8 100644 --- a/xFunc.Maths/Expressions/Matrices/Matrix.cs +++ b/xFunc.Maths/Expressions/Matrices/Matrix.cs @@ -13,9 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. using System; -#if NET35_OR_GREATER || PORTABLE using System.Linq; -#endif using System.Text; namespace xFunc.Maths.Expressions.Matrices diff --git a/xFunc.Maths/Expressions/Matrices/MatrixExtentions.cs b/xFunc.Maths/Expressions/Matrices/MatrixExtentions.cs index 97bb16a4a..cbf3e215c 100644 --- a/xFunc.Maths/Expressions/Matrices/MatrixExtentions.cs +++ b/xFunc.Maths/Expressions/Matrices/MatrixExtentions.cs @@ -13,9 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. using System; -#if NET35_OR_GREATER || PORTABLE using System.Linq; -#endif #if NET40_OR_GREATER using System.Threading.Tasks; #endif diff --git a/xFunc.Maths/Expressions/Matrices/Vector.cs b/xFunc.Maths/Expressions/Matrices/Vector.cs index 355efcbeb..d9680ab32 100644 --- a/xFunc.Maths/Expressions/Matrices/Vector.cs +++ b/xFunc.Maths/Expressions/Matrices/Vector.cs @@ -13,9 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. using System; -#if NET35_OR_GREATER || PORTABLE using System.Linq; -#endif using System.Text; namespace xFunc.Maths.Expressions.Matrices diff --git a/xFunc.Maths/Lexer.cs b/xFunc.Maths/Lexer.cs index 959dae93b..3978e48a6 100644 --- a/xFunc.Maths/Lexer.cs +++ b/xFunc.Maths/Lexer.cs @@ -15,9 +15,7 @@ using System; using System.Collections.Generic; using System.Globalization; -#if NET35_OR_GREATER || PORTABLE using System.Linq; -#endif using xFunc.Maths.Resources; using xFunc.Maths.Tokens; @@ -30,26 +28,16 @@ namespace xFunc.Maths public class Lexer : ILexer { -#if NET35_OR_GREATER || PORTABLE private readonly HashSet notVar; private readonly HashSet unaryMinusOp; -#elif NET20_OR_GREATER - private readonly List notVar; - private readonly List unaryMinusOp; -#endif /// /// Initializes a new instance of . /// public Lexer() { -#if NET35_OR_GREATER || PORTABLE notVar = new HashSet { "nand", "nor", "and", "or", "xor" }; unaryMinusOp = new HashSet { '(', '{', '*', '/', '^', '=' }; -#elif NET20_OR_GREATER - notVar = new List { "nand", "nor", "and", "or", "xor" }; - unaryMinusOp = new List { '(', '{', '*', '/', '^', '=' }; -#endif } private bool IsBalanced(string str) @@ -83,11 +71,7 @@ private bool IsBalanced(string str) /// Throws when has the not supported symbol. public IEnumerable Tokenize(string function) { -#if NET40_OR_GREATER || PORTABLE if (string.IsNullOrWhiteSpace(function)) -#elif NET20_OR_GREATER - if (StringExtension.IsNullOrWhiteSpace(function)) -#endif throw new ArgumentNullException(nameof(function), Resource.NotSpecifiedFunction); function = function.ToLower().Replace(" ", ""); diff --git a/xFunc.Maths/MathExtentions.cs b/xFunc.Maths/MathExtentions.cs index 3fae9f10b..410c9cd06 100644 --- a/xFunc.Maths/MathExtentions.cs +++ b/xFunc.Maths/MathExtentions.cs @@ -14,9 +14,7 @@ // limitations under the License. using System; using System.Globalization; -#if NET35_OR_GREATER || PORTABLE using System.Linq; -#endif namespace xFunc.Maths { diff --git a/xFunc.Maths/Parser.cs b/xFunc.Maths/Parser.cs index aca495792..204c0e49d 100644 --- a/xFunc.Maths/Parser.cs +++ b/xFunc.Maths/Parser.cs @@ -14,9 +14,7 @@ // limitations under the License. using System; using System.Collections.Generic; -#if NET35_OR_GREATER || PORTABLE using System.Linq; -#endif using xFunc.Maths.Expressions; using xFunc.Maths.Resources; using xFunc.Maths.Tokens; @@ -92,7 +90,11 @@ public static bool HasVar(IExpression expression, Variable arg) public ParameterCollection GetParameters(string function) { var tokens = lexer.Tokenize(function); +#if PORTABLE + var c = new List(); +#else var c = new SortedSet(); +#endif foreach (var token in tokens) { @@ -100,6 +102,9 @@ public ParameterCollection GetParameters(string function) if (@var != null) c.Add(new Parameter(@var.Variable, false)); } +#if PORTABLE + c.Sort(); +#endif return new ParameterCollection(c, false); } @@ -149,11 +154,7 @@ private void ConvertToColletion(IExpression expression, List collec /// The parsed expression. public IExpression Parse(string function) { -#if NET40_OR_GREATER || PORTABLE if (string.IsNullOrWhiteSpace(function)) -#elif NET20_OR_GREATER - if (StringExtension.IsNullOrWhiteSpace(function)) -#endif throw new ArgumentNullException(nameof(function)); if (!saveLastExpression || function != lastFunc) diff --git a/xFunc.Maths/StringExtension.cs b/xFunc.Maths/StringExtension.cs deleted file mode 100644 index b701122cd..000000000 --- a/xFunc.Maths/StringExtension.cs +++ /dev/null @@ -1,25 +0,0 @@ -#if NET20 || NET30 || NET35 - -using System; - -namespace xFunc.Maths -{ - - internal static class StringExtension - { - - public static bool IsNullOrWhiteSpace(string value) - { - if (value != null) - for (int i = 0; i < value.Length; i++) - if (!char.IsWhiteSpace(value[i])) - return false; - - return true; - } - - } - -} - -#endif \ No newline at end of file diff --git a/xFunc.Maths/xFunc.Maths (.Net 2.0).csproj b/xFunc.Maths/xFunc.Maths (.Net 2.0).csproj deleted file mode 100644 index 2bfeeae9a..000000000 --- a/xFunc.Maths/xFunc.Maths (.Net 2.0).csproj +++ /dev/null @@ -1,236 +0,0 @@ - - - - - Debug - AnyCPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C} - Library - Properties - xFunc.Maths - xFunc.Maths - v2.0 - 512 - - - true - full - false - bin\Debug\net20\ - TRACE;DEBUG;NET20;NET20_OR_GREATER - prompt - 4 - - - pdbonly - true - bin\Release\net20\ - TRACE;NET20;NET20_OR_GREATER - prompt - 4 - bin\Release\net20\xFunc.Maths.XML - - - true - - - ..\key.pfx - - - - - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Resource.ru.resx - - - True - True - Resource.uk.resx - - - - - - Resource.resx - True - True - - - - - - - - - - - - - - - - - - - - - - ResXFileCodeGenerator - Resource.uk.Designer.cs - - - ResXFileCodeGenerator - Resource.Designer.cs - - - ResXFileCodeGenerator - Resource.ru.Designer.cs - - - - - key.pfx - - - LICENSE - PreserveNewest - - - NOTICE - PreserveNewest - - - - - \ No newline at end of file diff --git a/xFunc.Maths/xFunc.Maths (.Net 3.0).csproj b/xFunc.Maths/xFunc.Maths (.Net 3.0).csproj deleted file mode 100644 index edc068a2a..000000000 --- a/xFunc.Maths/xFunc.Maths (.Net 3.0).csproj +++ /dev/null @@ -1,238 +0,0 @@ - - - - - Debug - AnyCPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C} - Library - Properties - xFunc.Maths - xFunc.Maths - v3.0 - 512 - - - - true - full - false - bin\Debug\net30\ - TRACE;DEBUG;NET30;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - - - pdbonly - true - bin\Release\net30\ - TRACE;NET30;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - MinimumRecommendedRules.ruleset - bin\Release\net30\xFunc.Maths.XML - - - true - - - ..\key.pfx - - - - - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Resource.ru.resx - - - True - True - Resource.uk.resx - - - - - - Resource.resx - True - True - - - - - - - - - - - - - - - - - - - - - - ResXFileCodeGenerator - Resource.uk.Designer.cs - - - ResXFileCodeGenerator - Resource.Designer.cs - - - ResXFileCodeGenerator - Resource.ru.Designer.cs - - - - - key.pfx - - - LICENSE - PreserveNewest - - - NOTICE - PreserveNewest - - - - - \ No newline at end of file diff --git a/xFunc.Maths/xFunc.Maths (.Net 3.5).csproj b/xFunc.Maths/xFunc.Maths (.Net 3.5).csproj deleted file mode 100644 index 541711b45..000000000 --- a/xFunc.Maths/xFunc.Maths (.Net 3.5).csproj +++ /dev/null @@ -1,238 +0,0 @@ - - - - - Debug - AnyCPU - {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C} - Library - Properties - xFunc.Maths - xFunc.Maths - v3.5 - 512 - - - - true - full - false - bin\Debug\net35\ - TRACE;DEBUG;NET35;NET35_OR_GREATER;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - - - pdbonly - true - bin\Release\net35\ - TRACE;NET35;NET35_OR_GREATER;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - MinimumRecommendedRules.ruleset - bin\Release\net35\xFunc.Maths.XML - - - true - - - ..\key.pfx - - - - - - - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Resource.ru.resx - - - True - True - Resource.uk.resx - - - - - - Resource.resx - True - True - - - - - - - - - - - - - - - - - - - - - - ResXFileCodeGenerator - Resource.uk.Designer.cs - - - ResXFileCodeGenerator - Resource.Designer.cs - - - ResXFileCodeGenerator - Resource.ru.Designer.cs - - - - - key.pfx - - - LICENSE - PreserveNewest - - - NOTICE - PreserveNewest - - - - - \ No newline at end of file diff --git a/xFunc.Test/LogicLexerTest.cs b/xFunc.Test/LogicLexerTest.cs deleted file mode 100644 index 71c8e124e..000000000 --- a/xFunc.Test/LogicLexerTest.cs +++ /dev/null @@ -1,402 +0,0 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using System.Collections.Generic; -using System.Linq; -using xFunc.Logics; - -namespace xFunc.Test -{ - - [TestClass] - public class LogicLexerTest - { - - private ILexer lexer; - - [TestInitialize] - public void TestInit() - { - lexer = new LogicLexer(); - } - - [TestMethod] - [ExpectedException(typeof(ArgumentNullException))] - public void NullArg() - { - lexer.Tokenize(null); - } - - [TestMethod] - [ExpectedException(typeof(LogicLexerException))] - public void NotSupportedSymbol() - { - lexer.Tokenize("@"); - } - - [TestMethod] - public void Brackets() - { - var tokens = lexer.Tokenize("(a)"); - - var expected = new List() - { - new LogicToken(LogicTokenType.OpenBracket), - new LogicToken("a"), - new LogicToken(LogicTokenType.CloseBracket) - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void Not() - { - var tokens = lexer.Tokenize("!a"); - - var expected = new List() - { - new LogicToken(LogicTokenType.Not), - new LogicToken("a") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void And() - { - var tokens = lexer.Tokenize("a & b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.And), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void Or() - { - var tokens = lexer.Tokenize("a | b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.Or), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void Impl1() - { - var tokens = lexer.Tokenize("a -> b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.Implication), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void Impl2() - { - var tokens = lexer.Tokenize("a => b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.Implication), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void Eq1() - { - var tokens = lexer.Tokenize("a <-> b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.Equality), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void Eq() - { - var tokens = lexer.Tokenize("a <=> b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.Equality), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void XOr() - { - var tokens = lexer.Tokenize("a ^ b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.XOr), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void Assign() - { - var tokens = lexer.Tokenize("a := true"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.Assign), - new LogicToken(LogicTokenType.True) - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void True() - { - var tokens = lexer.Tokenize("true"); - - var expected = new List() - { - new LogicToken(LogicTokenType.True) - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void False() - { - var tokens = lexer.Tokenize("false"); - - var expected = new List() - { - new LogicToken(LogicTokenType.False) - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void NotAsWord() - { - var tokens = lexer.Tokenize("not(a)"); - - var expected = new List() - { - new LogicToken(LogicTokenType.Not), - new LogicToken(LogicTokenType.OpenBracket), - new LogicToken("a"), - new LogicToken(LogicTokenType.CloseBracket) - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void AndAsWord() - { - var tokens = lexer.Tokenize("a and b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.And), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void OrAsWord() - { - var tokens = lexer.Tokenize("a or b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.Or), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void ImplAsWord() - { - var tokens = lexer.Tokenize("a impl b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.Implication), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void EqAsWord() - { - var tokens = lexer.Tokenize("a eq b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.Equality), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void NOrAsWord() - { - var tokens = lexer.Tokenize("a nor b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.NOr), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void NAndAsWord() - { - var tokens = lexer.Tokenize("a nand b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.NAnd), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void XOrAsWord() - { - var tokens = lexer.Tokenize("a xor b"); - - var expected = new List() - { - new LogicToken("a"), - new LogicToken(LogicTokenType.XOr), - new LogicToken("b") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void TruthTableAsWord() - { - var tokens = lexer.Tokenize("table(a & b)"); - - var expected = new List() - { - new LogicToken(LogicTokenType.TruthTable), - new LogicToken(LogicTokenType.OpenBracket), - new LogicToken("a"), - new LogicToken(LogicTokenType.And), - new LogicToken("b"), - new LogicToken(LogicTokenType.CloseBracket) - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void TrueShort() - { - var tokens = lexer.Tokenize("t"); - - var expected = new List() - { - new LogicToken(LogicTokenType.True) - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void FalseShort() - { - var tokens = lexer.Tokenize("f"); - - var expected = new List() - { - new LogicToken(LogicTokenType.False) - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void Var() - { - var tokens = lexer.Tokenize("a"); - - var expected = new List() - { - new LogicToken("a") - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - public void StringVarLexerTest() - { - var tokens = lexer.Tokenize("aaa := true"); - - var expected = new List() - { - new LogicToken("aaa"), - new LogicToken(LogicTokenType.Assign), - new LogicToken(LogicTokenType.True) - }; - CollectionAssert.AreEqual(expected, tokens.ToList()); - } - - [TestMethod] - [ExpectedException(typeof(LogicLexerException))] - public void NotBalancedOpen() - { - var tokens = lexer.Tokenize("table(a("); - } - - [TestMethod] - [ExpectedException(typeof(LogicLexerException))] - public void NotBalancedClose() - { - var tokens = lexer.Tokenize("table)a)"); - } - - [TestMethod] - [ExpectedException(typeof(LogicLexerException))] - public void NotBalancedFirstClose() - { - var tokens = lexer.Tokenize("table)a("); - } - - } - -} diff --git a/xFunc.Test/LogicParameterCollectionTest.cs b/xFunc.Test/LogicParameterCollectionTest.cs deleted file mode 100644 index 7e00f8de4..000000000 --- a/xFunc.Test/LogicParameterCollectionTest.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using xFunc.Logics.Expressions; - -namespace xFunc.Test -{ - - [TestClass] - public class LogicParameterCollectionTest - { - - [TestMethod] - public void AddTest() - { - LogicParameterCollection target = new LogicParameterCollection(); - target.Add("a"); - target.Add("b"); - - target["a"] = true; - target["b"] = false; - - Assert.AreEqual(2, target.Bits); - Assert.IsTrue(target["a"]); - Assert.IsFalse(target["b"]); - } - - [TestMethod] - public void RemoveTest() - { - LogicParameterCollection target = new LogicParameterCollection(); - target.Add("a"); - target.Add("b"); - - target["a"] = true; - target["b"] = false; - - target.Remove("a"); - target.Remove("b"); - - Assert.AreEqual(0, target.Count); - Assert.AreEqual(0, target.Bits); - } - - } - -} diff --git a/xFunc.Test/LogicParserTest.cs b/xFunc.Test/LogicParserTest.cs deleted file mode 100644 index bb14600cf..000000000 --- a/xFunc.Test/LogicParserTest.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System.Collections.Generic; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using xFunc.Logics; -using xFunc.Logics.Expressions; - -namespace xFunc.Test -{ - - [TestClass] - public class LogicParserTest - { - - private LogicParser logicParser; - - [TestInitialize] - public void TestInit() - { - logicParser = new LogicParser(); - } - - [TestMethod] - public void GetLogicParametersTest() - { - string function = "a | b & c & (a | c)"; - var expected = new LogicParameterCollection() - { - "a", - "b", - "c" - }; - - LogicParameterCollection actual = logicParser.GetLogicParameters(function); - - - CollectionAssert.AreEqual(expected, actual); - } - - [TestMethod] - public void ConvertLogicExpressionToColletion() - { - ILogicExpression exp = logicParser.Parse("(a | b) -> !c"); - List actual = new List(logicParser.ConvertLogicExpressionToCollection(exp)); - - Assert.AreEqual(3, actual.Count); - } - - [TestMethod] - public void LogicParseTest() - { - string function = "(a | c) & b"; - ILogicExpression actual = logicParser.Parse(function); - Assert.IsTrue(actual is And); - - And a = (And)actual; - Assert.IsTrue(a.Left is Or); - Assert.IsTrue(a.Right is Variable); - } - - } - -} diff --git a/xFunc.Test/xFunc.Tests (.Net 2.0).csproj b/xFunc.Test/xFunc.Tests (.Net 2.0).csproj deleted file mode 100644 index d045bf051..000000000 --- a/xFunc.Test/xFunc.Tests (.Net 2.0).csproj +++ /dev/null @@ -1,162 +0,0 @@ - - - - Debug - AnyCPU - - - 2.0 - {E762246C-21B2-47D9-9D80-54E9E0ED3150} - Library - Properties - xFunc.Test - xFunc.Test - v3.5 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - bin\net20\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\net20\Release\ - TRACE - prompt - 4 - - - - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {dfc61417-f3cc-47d5-b2de-4029be939a4c} - xFunc.Logics - - - {91ad4fbf-d01a-4bd3-b3e9-caf885cc208c} - xFunc.Maths - - - {2ecaad28-e0ce-40be-8eb0-0d055c908133} - xFunc.UnitConverters %28.Net 2.0%29 - - - - - \ No newline at end of file diff --git a/xFunc.Test/xFunc.Tests (.Net 3.0).csproj b/xFunc.Test/xFunc.Tests (.Net 3.0).csproj deleted file mode 100644 index e6cc653bc..000000000 --- a/xFunc.Test/xFunc.Tests (.Net 3.0).csproj +++ /dev/null @@ -1,161 +0,0 @@ - - - - Debug - AnyCPU - - - 2.0 - {E762246C-21B2-47D9-9D80-54E9E0ED3150} - Library - Properties - xFunc.Test - xFunc.Test - v3.5 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - bin\net30\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\net30\Release\ - TRACE - prompt - 4 - - - - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {dfc61417-f3cc-47d5-b2de-4029be939a4c} - xFunc.Logics %28.Net 3.0%29 - - - {91ad4fbf-d01a-4bd3-b3e9-caf885cc208c} - xFunc.Maths %28.Net 3.0%29 - - - {2ecaad28-e0ce-40be-8eb0-0d055c908133} - xFunc.UnitConverters %28.Net 3.0%29 - - - - \ No newline at end of file diff --git a/xFunc.Test/xFunc.Tests (.Net 3.5).csproj b/xFunc.Test/xFunc.Tests (.Net 3.5).csproj deleted file mode 100644 index 52d24a518..000000000 --- a/xFunc.Test/xFunc.Tests (.Net 3.5).csproj +++ /dev/null @@ -1,161 +0,0 @@ - - - - Debug - AnyCPU - - - 2.0 - {E762246C-21B2-47D9-9D80-54E9E0ED3150} - Library - Properties - xFunc.Test - xFunc.Test - v3.5 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - bin\net35\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\net35\Release\ - TRACE - prompt - 4 - - - - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {dfc61417-f3cc-47d5-b2de-4029be939a4c} - xFunc.Logics %28.Net 3.5%29 - - - {91ad4fbf-d01a-4bd3-b3e9-caf885cc208c} - xFunc.Maths %28.Net 3.5%29 - - - {2ecaad28-e0ce-40be-8eb0-0d055c908133} - xFunc.UnitConverters %28.Net 3.5%29 - - - - \ No newline at end of file diff --git a/xFunc.Test/xFunc.Tests (.Net 4.0).csproj b/xFunc.Test/xFunc.Tests (.Net 4.0).csproj index f8f677482..582b6f2e9 100644 --- a/xFunc.Test/xFunc.Tests (.Net 4.0).csproj +++ b/xFunc.Test/xFunc.Tests (.Net 4.0).csproj @@ -133,22 +133,15 @@ - - - - - {dfc61417-f3cc-47d5-b2de-4029be939a4c} - xFunc.Logics %28.Net 4.0%29 - {91ad4fbf-d01a-4bd3-b3e9-caf885cc208c} xFunc.Maths %28.Net 4.0%29 diff --git a/xFunc.Test/xFunc.Tests (.Net 4.5).csproj b/xFunc.Test/xFunc.Tests (.Net 4.5).csproj index 327b0f63f..ab34e6df4 100644 --- a/xFunc.Test/xFunc.Tests (.Net 4.5).csproj +++ b/xFunc.Test/xFunc.Tests (.Net 4.5).csproj @@ -52,15 +52,14 @@ - - - - - - - - - + + + + + + + + @@ -136,21 +135,15 @@ - - - + - - {dfc61417-f3cc-47d5-b2de-4029be939a4c} - xFunc.Logics %28.Net 4.5%29 - {91ad4fbf-d01a-4bd3-b3e9-caf885cc208c} xFunc.Maths %28.Net 4.5%29 diff --git a/xFunc.Test/xFunc.Tests (.Net 4.5.1).csproj b/xFunc.Test/xFunc.Tests (.Net 4.5.1).csproj index b88fa71be..46d82f1d5 100644 --- a/xFunc.Test/xFunc.Tests (.Net 4.5.1).csproj +++ b/xFunc.Test/xFunc.Tests (.Net 4.5.1).csproj @@ -52,15 +52,14 @@ - - - - - - - - - + + + + + + + + @@ -136,21 +135,15 @@ - - - + - - {dfc61417-f3cc-47d5-b2de-4029be939a4c} - xFunc.Logics - {91ad4fbf-d01a-4bd3-b3e9-caf885cc208c} xFunc.Maths diff --git a/xFunc.Test/xFunc.Tests (Portable).csproj b/xFunc.Test/xFunc.Tests (Portable).csproj index 60ed4d2d0..a3d26751e 100644 --- a/xFunc.Test/xFunc.Tests (Portable).csproj +++ b/xFunc.Test/xFunc.Tests (Portable).csproj @@ -52,15 +52,14 @@ - - - - - - - - - + + + + + + + + @@ -136,21 +135,15 @@ - - - + - - {83b0d9ff-8cd7-4bff-bac1-cba217106f67} - xFunc.Logics %28Portable%29 - {b3ebddb0-2f08-4ccc-bede-5f26f36b9602} xFunc.Maths %28Portable%29 diff --git a/xFunc.UnitConverters/xFunc.UnitConverters (.Net 2.0).csproj b/xFunc.UnitConverters/xFunc.UnitConverters (.Net 2.0).csproj deleted file mode 100644 index d752ff0b1..000000000 --- a/xFunc.UnitConverters/xFunc.UnitConverters (.Net 2.0).csproj +++ /dev/null @@ -1,100 +0,0 @@ - - - - - Debug - AnyCPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133} - Library - Properties - xFunc.UnitConverters - xFunc.UnitConverters - v2.0 - 512 - - - true - full - false - bin\Debug\net20\ - DEBUG;TRACE;NET20;NET20_OR_GREATER - prompt - 4 - - - pdbonly - true - bin\Release\net20\ - TRACE;NET20;NET20_OR_GREATER - prompt - 4 - bin\Release\net20\xFunc.UnitConverters.XML - - - true - - - ..\key.pfx - - - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - True - True - Resource.resx - - - - - - - - - - - key.pfx - - - LICENSE - PreserveNewest - - - NOTICE - PreserveNewest - - - - - ResXFileCodeGenerator - Resource.Designer.cs - - - - - - - \ No newline at end of file diff --git a/xFunc.UnitConverters/xFunc.UnitConverters (.Net 3.0).csproj b/xFunc.UnitConverters/xFunc.UnitConverters (.Net 3.0).csproj deleted file mode 100644 index 255e28ccb..000000000 --- a/xFunc.UnitConverters/xFunc.UnitConverters (.Net 3.0).csproj +++ /dev/null @@ -1,100 +0,0 @@ - - - - - Debug - AnyCPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133} - Library - Properties - xFunc.UnitConverters - xFunc.UnitConverters - v3.0 - 512 - - - true - full - false - bin\Debug\net30\ - DEBUG;TRACE;NET30;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - - - pdbonly - true - bin\Release\net30\ - TRACE;NET30;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - bin\Release\net30\xFunc.UnitConverters.XML - - - true - - - ..\key.pfx - - - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - True - True - Resource.resx - - - - - - - - - - - key.pfx - - - LICENSE - PreserveNewest - - - NOTICE - PreserveNewest - - - - - ResXFileCodeGenerator - Resource.Designer.cs - - - - - - - \ No newline at end of file diff --git a/xFunc.UnitConverters/xFunc.UnitConverters (.Net 3.5).csproj b/xFunc.UnitConverters/xFunc.UnitConverters (.Net 3.5).csproj deleted file mode 100644 index ee383601a..000000000 --- a/xFunc.UnitConverters/xFunc.UnitConverters (.Net 3.5).csproj +++ /dev/null @@ -1,99 +0,0 @@ - - - - - Debug - AnyCPU - {2ECAAD28-E0CE-40BE-8EB0-0D055C908133} - Library - Properties - xFunc.UnitConverters - xFunc.UnitConverters - v3.5 - 512 - - - true - full - false - bin\Debug\net35\ - DEBUG;TRACE;NET35;NET35_OR_GREATER;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - - - pdbonly - true - bin\Release\net35\ - TRACE;NET35;NET35_OR_GREATER;NET30_OR_GREATER;NET20_OR_GREATER - prompt - 4 - bin\Release\net35\xFunc.UnitConverters.XML - - - true - - - ..\key.pfx - - - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - True - True - Resource.resx - - - - - - - - - - - key.pfx - - - LICENSE - PreserveNewest - - - NOTICE - PreserveNewest - - - - - ResXFileCodeGenerator - Resource.Designer.cs - - - - - - - \ No newline at end of file diff --git a/xFunc.sln b/xFunc.sln index a47508bcb..bb69ef487 100644 --- a/xFunc.sln +++ b/xFunc.sln @@ -15,8 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Maths (.Net 4.0)", "xFunc.Maths\xFunc.Maths (.Net 4.0).csproj", "{91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.Logics (.Net 4.0)", "xFunc.Logics\xFunc.Logics (.Net 4.0).csproj", "{DFC61417-F3CC-47D5-B2DE-4029BE939A4C}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xFunc.UnitConverters (.Net 4.0)", "xFunc.UnitConverters\xFunc.UnitConverters (.Net 4.0).csproj", "{2ECAAD28-E0CE-40BE-8EB0-0D055C908133}" EndProject Global @@ -37,10 +35,6 @@ Global {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Debug|Any CPU.Build.0 = Debug|Any CPU {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.ActiveCfg = Release|Any CPU {91AD4FBF-D01A-4BD3-B3E9-CAF885CC208C}.Release|Any CPU.Build.0 = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DFC61417-F3CC-47D5-B2DE-4029BE939A4C}.Release|Any CPU.Build.0 = Release|Any CPU {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Debug|Any CPU.Build.0 = Debug|Any CPU {2ECAAD28-E0CE-40BE-8EB0-0D055C908133}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/xFunc/Presenters/Updater.cs b/xFunc/Presenters/Updater.cs index b931f0890..89f134991 100644 --- a/xFunc/Presenters/Updater.cs +++ b/xFunc/Presenters/Updater.cs @@ -23,7 +23,7 @@ internal class Updater { private const string CheckUri = "http://xfunc.codeplex.com/releases/"; - private const int CurrentRelease = 616963; + private const int CurrentRelease = 617477; private string updateUri; private bool hasUpdates;