diff --git a/.gitignore b/.gitignore index 696db86..fdd5ef6 100644 --- a/.gitignore +++ b/.gitignore @@ -182,3 +182,4 @@ UpgradeLog*.htm # Microsoft Fakes FakesAssemblies/ .vs/config/applicationhost.config +/.vs diff --git a/Neo4jClient.Extension.sln b/Neo4jClient.Extension.sln index ac0ad9d..8f514a8 100644 --- a/Neo4jClient.Extension.sln +++ b/Neo4jClient.Extension.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30804.86 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{12FEE675-BAC9-48E5-9C28-28ED67FFC9AE}" ProjectSection(SolutionItems) = preProject @@ -18,30 +18,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Properties", "Properties", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{9CE869B3-2DAC-4EBF-88B6-F70F74198B9B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neo4jClient.Extension", "src\Neo4jClient.Extension\Neo4jClient.Extension.csproj", "{41C65BED-56A6-4942-95D2-10E62F607C7F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neo4jClient.Extension.Attributes", "src\Neo4jClient.Extension.Attributes\Neo4jClient.Extension.Attributes.csproj", "{6D2502F8-F491-45E6-ABD8-2F7407926F5A}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neo4jClient.Extension.IntegrationTest", "test\Neo4jClient.Extension.IntegrationTest\Neo4jClient.Extension.IntegrationTest.csproj", "{8F1FA0BF-C481-4D1D-A8ED-F9B4CB17E98B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neo4jClient.Extension.Test.Common", "test\Neo4jClient.Extension.Test.Common\Neo4jClient.Extension.Test.Common.csproj", "{B7C14349-6BEC-44D1-AB33-B82AD85899AA}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neo4jClient.Extension.UnitTest", "test\Neo4jClient.Extension.UnitTest\Neo4jClient.Extension.UnitTest.csproj", "{066A5EBD-C612-40E2-8065-160FA9853503}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neo4jClient.Extension.Attributes", "src\Neo4jClient.Extension.Attributes\Neo4jClient.Extension.Attributes.csproj", "{D8E8001F-D6FA-44D2-933E-9BDAADF45CFB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neo4jClient.Extension", "src\Neo4jClient.Extension\Neo4jClient.Extension.csproj", "{6C3E1F7B-26FD-4D71-8AF6-A24985D4217B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {41C65BED-56A6-4942-95D2-10E62F607C7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {41C65BED-56A6-4942-95D2-10E62F607C7F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {41C65BED-56A6-4942-95D2-10E62F607C7F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {41C65BED-56A6-4942-95D2-10E62F607C7F}.Release|Any CPU.Build.0 = Release|Any CPU - {6D2502F8-F491-45E6-ABD8-2F7407926F5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6D2502F8-F491-45E6-ABD8-2F7407926F5A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6D2502F8-F491-45E6-ABD8-2F7407926F5A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6D2502F8-F491-45E6-ABD8-2F7407926F5A}.Release|Any CPU.Build.0 = Release|Any CPU {8F1FA0BF-C481-4D1D-A8ED-F9B4CB17E98B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8F1FA0BF-C481-4D1D-A8ED-F9B4CB17E98B}.Debug|Any CPU.Build.0 = Debug|Any CPU {8F1FA0BF-C481-4D1D-A8ED-F9B4CB17E98B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -54,6 +46,14 @@ Global {066A5EBD-C612-40E2-8065-160FA9853503}.Debug|Any CPU.Build.0 = Debug|Any CPU {066A5EBD-C612-40E2-8065-160FA9853503}.Release|Any CPU.ActiveCfg = Release|Any CPU {066A5EBD-C612-40E2-8065-160FA9853503}.Release|Any CPU.Build.0 = Release|Any CPU + {D8E8001F-D6FA-44D2-933E-9BDAADF45CFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8E8001F-D6FA-44D2-933E-9BDAADF45CFB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8E8001F-D6FA-44D2-933E-9BDAADF45CFB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8E8001F-D6FA-44D2-933E-9BDAADF45CFB}.Release|Any CPU.Build.0 = Release|Any CPU + {6C3E1F7B-26FD-4D71-8AF6-A24985D4217B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C3E1F7B-26FD-4D71-8AF6-A24985D4217B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C3E1F7B-26FD-4D71-8AF6-A24985D4217B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C3E1F7B-26FD-4D71-8AF6-A24985D4217B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,4 +64,7 @@ Global {B7C14349-6BEC-44D1-AB33-B82AD85899AA} = {9CE869B3-2DAC-4EBF-88B6-F70F74198B9B} {066A5EBD-C612-40E2-8065-160FA9853503} = {9CE869B3-2DAC-4EBF-88B6-F70F74198B9B} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {703CE485-12EB-46BF-ACB6-B63DDCA7D293} + EndGlobalSection EndGlobal diff --git a/src/Neo4jClient.Extension.Attributes/Neo4jClient.Extension.Attributes.csproj b/src/Neo4jClient.Extension.Attributes/Neo4jClient.Extension.Attributes.csproj index d329ffb..d7f37e7 100644 --- a/src/Neo4jClient.Extension.Attributes/Neo4jClient.Extension.Attributes.csproj +++ b/src/Neo4jClient.Extension.Attributes/Neo4jClient.Extension.Attributes.csproj @@ -1,79 +1,12 @@ - - - + + - Debug - AnyCPU - {6D2502F8-F491-45E6-ABD8-2F7407926F5A} - Library - Properties - Neo4jClient.Extension.Attributes - Neo4jClient.Extension.Attributes - v4.5 - 512 - ..\..\ + netstandard2.0 + Neo4jClient.Extension.Attributes.NetStandard + Simon Pinn, Yann ROBIN + Extending the awesome Neo4jClient, provides just the attributes required by Neo4jClient.Extension to allow class libraries to remove dependency on Neo4jClient + Neo4j Neo4jClient GraphDb GraphData + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\packages\Neo4jClient.1.1.0.1\lib\net45\Neo4jClient.dll - True - - - False - ..\..\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll - - - - - - - - - - - - Properties\AssemblyInfoGlobal.cs - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + diff --git a/src/Neo4jClient.Extension.Attributes/Neo4jClient.Extension.Attributes.nuspec b/src/Neo4jClient.Extension.Attributes/Neo4jClient.Extension.Attributes.nuspec deleted file mode 100644 index 14517d4..0000000 --- a/src/Neo4jClient.Extension.Attributes/Neo4jClient.Extension.Attributes.nuspec +++ /dev/null @@ -1,20 +0,0 @@ - - - - Neo4jClient.Extension.Attributes - $version$ - Neo4jClient.Extension.Attributes - Simon Pinn - Simon Pinn - https://github.com/simonpinn/Neo4jClient.Extension/blob/master/LICENSE - https://github.com/simonpinn/Neo4jClient.Extension - false - Extending the awesome Neo4jClient, provides just the attributes required by Neo4jClient.Extension to allow class libraries to remove dependency on Neo4jClient - Copyright 2015 - Neo4j Neo4jClient GraphDb GraphData - Simplify and reduce magic strings when using the Neo4jClient, allows any object to be a data POCO - - - - - \ No newline at end of file diff --git a/src/Neo4jClient.Extension.Attributes/Properties/AssemblyInfo.cs b/src/Neo4jClient.Extension.Attributes/Properties/AssemblyInfo.cs index 7403a9d..a4bea80 100644 --- a/src/Neo4jClient.Extension.Attributes/Properties/AssemblyInfo.cs +++ b/src/Neo4jClient.Extension.Attributes/Properties/AssemblyInfo.cs @@ -1,6 +1,3 @@ -using System.Reflection; - -[assembly: AssemblyTitle("Neo4jClient.Extension.Attribute")] -[assembly: AssemblyProduct("Neo4jClient.Extension.Attribute")] -[assembly: AssemblyDescription("Extending the awesome Neo4jClient")] +using System.Runtime.CompilerServices; +[assembly: InternalsVisibleTo("Neo4jClient.Extension.Test")] \ No newline at end of file diff --git a/src/Neo4jClient.Extension.Attributes/packages.config b/src/Neo4jClient.Extension.Attributes/packages.config deleted file mode 100644 index eabaa28..0000000 --- a/src/Neo4jClient.Extension.Attributes/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/Neo4jClient.Extension/Cypher/CypherExtensionContext.cs b/src/Neo4jClient.Extension/Cypher/CypherExtensionContext.cs index 5f7dd3a..105a762 100644 --- a/src/Neo4jClient.Extension/Cypher/CypherExtensionContext.cs +++ b/src/Neo4jClient.Extension/Cypher/CypherExtensionContext.cs @@ -20,7 +20,7 @@ public static CypherExtensionContext Create(ICypherFluentQuery query) public CypherExtensionContext() { - JsonContractResolver = new CamelCasePropertyNamesContractResolver(); + JsonContractResolver = GraphClient.DefaultJsonContractResolver; } public IContractResolver JsonContractResolver { get; set; } diff --git a/src/Neo4jClient.Extension/Cypher/Extension/CypherExtension.CqlBuilders.cs b/src/Neo4jClient.Extension/Cypher/Extension/CypherExtension.CqlBuilders.cs index 8719433..27f5a55 100644 --- a/src/Neo4jClient.Extension/Cypher/Extension/CypherExtension.CqlBuilders.cs +++ b/src/Neo4jClient.Extension/Cypher/Extension/CypherExtension.CqlBuilders.cs @@ -12,7 +12,7 @@ public static partial class CypherExtension { private static string GetMatchWithParam(string key, string label, string paramName) { - return GetMatchCypher(key, label, string.IsNullOrEmpty(paramName) ? "" : AsWrappedVariable(paramName)); + return GetMatchCypher(key, label, string.IsNullOrEmpty(paramName) ? "" : $"${paramName}"); } private static string GetMatchCypher(string key, string label, string variable) @@ -39,7 +39,7 @@ private static string WithPrePostWrap(string innerCypher, IOptionsBase options) private static string GetSetWithParamCql(string alias, string paramName) { - var cql = string.Format("{0} = {{{1}}}", alias, paramName); + var cql = string.Format("{0} = ${1}", alias, paramName); return cql; } @@ -74,7 +74,7 @@ internal static string GetMatchCypher(this TEntity entity paramKey = entity.EntityParamKey(paramKey); var matchProperties = useProperties - .Select(x => string.Format("{0}:{{{1}}}.{0}", x.JsonName, GetMatchParamName(paramKey))) + .Select(x => string.Format("{0}:${1}.{0}", x.JsonName, GetMatchParamName(paramKey))) .ToList(); var jsonProperties = string.Join(",", matchProperties); diff --git a/src/Neo4jClient.Extension/Neo4jClient.Extension.csproj b/src/Neo4jClient.Extension/Neo4jClient.Extension.csproj index a696fb3..be4e639 100644 --- a/src/Neo4jClient.Extension/Neo4jClient.Extension.csproj +++ b/src/Neo4jClient.Extension/Neo4jClient.Extension.csproj @@ -1,108 +1,20 @@ - - - + + - Debug - AnyCPU - {41C65BED-56A6-4942-95D2-10E62F607C7F} - Library - Properties - Neo4jClient.Extension - Neo4jClient.Extension - v4.5 - 512 - ..\..\ - + netstandard2.0 + Neo4jClient.Extension.NetStandard + Simon Pinn, Yann ROBIN + Extending the awesome Neo4jClient. Simplify and reduce magic strings when using the Neo4jClient, allows any object to be a data POCO + Neo4j Neo4jClient GraphDb GraphData + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\packages\Neo4jClient.1.1.0.1\lib\net45\Neo4jClient.dll - True - - - False - ..\..\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll - - - - - - False - ..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll - - - False - ..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll - - - - - - - - - - Properties\AssemblyInfoGlobal.cs - - - - - - - - - - - - - - - - - - - - + - - - Designer - + + - - {6d2502f8-f491-45e6-abd8-2f7407926f5a} - Neo4jClient.Extension.Attributes - + - - - - - - - - \ No newline at end of file + + diff --git a/src/Neo4jClient.Extension/Neo4jClient.Extension.nuspec b/src/Neo4jClient.Extension/Neo4jClient.Extension.nuspec deleted file mode 100644 index 0a4b45a..0000000 --- a/src/Neo4jClient.Extension/Neo4jClient.Extension.nuspec +++ /dev/null @@ -1,20 +0,0 @@ - - - - Neo4jClient.Extension - $version$ - Neo4jClient.Extension - Simon Pinn - Simon Pinn - https://github.com/simonpinn/Neo4jClient.Extension/blob/master/LICENSE - https://github.com/simonpinn/Neo4jClient.Extension - false - $description$ - Copyright 2014 - Neo4j Neo4jClient GraphDb GraphData - Simplify and reduce magic strings when using the Neo4jClient, allows any object to be a data POCO - - - - - \ No newline at end of file diff --git a/src/Neo4jClient.Extension/Properties/AssemblyInfo.cs b/src/Neo4jClient.Extension/Properties/AssemblyInfo.cs index 2afa26f..a4bea80 100644 --- a/src/Neo4jClient.Extension/Properties/AssemblyInfo.cs +++ b/src/Neo4jClient.Extension/Properties/AssemblyInfo.cs @@ -1,6 +1,3 @@ -using System.Reflection; - -[assembly: AssemblyTitle("Neo4jClient.Extension")] -[assembly: AssemblyProduct("Neo4jClient.Extension")] -[assembly: AssemblyDescription("Extending the awesome Neo4jClient, provides just the attributes required by Neo4jClient.Extension to allow class libraries to remove dependency on Neo4jClient")] +using System.Runtime.CompilerServices; +[assembly: InternalsVisibleTo("Neo4jClient.Extension.Test")] \ No newline at end of file diff --git a/src/Neo4jClient.Extension/packages.config b/src/Neo4jClient.Extension/packages.config deleted file mode 100644 index de54df6..0000000 --- a/src/Neo4jClient.Extension/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/test/Neo4jClient.Extension.IntegrationTest/App.config b/test/Neo4jClient.Extension.IntegrationTest/App.config index dea7715..66c2aa2 100644 --- a/test/Neo4jClient.Extension.IntegrationTest/App.config +++ b/test/Neo4jClient.Extension.IntegrationTest/App.config @@ -1,6 +1,19 @@ - + - + - + + + + + + + + + + + + + + diff --git a/test/Neo4jClient.Extension.IntegrationTest/IntegrationTest.cs b/test/Neo4jClient.Extension.IntegrationTest/IntegrationTest.cs index 2a792cc..f1746d8 100644 --- a/test/Neo4jClient.Extension.IntegrationTest/IntegrationTest.cs +++ b/test/Neo4jClient.Extension.IntegrationTest/IntegrationTest.cs @@ -25,7 +25,7 @@ public void Setup() CypherQuery.Match("(n)") .OptionalMatch("(n)-[r]-()") .Delete("n, r") - .ExecuteWithoutResults(); + .ExecuteWithoutResultsAsync().Wait(); } protected Func RealQueryFactory @@ -40,7 +40,7 @@ static IntegrationTest() GraphClient.JsonConverters.Add(new AreaJsonConverter()); - GraphClient.Connect(); + GraphClient.ConnectAsync().Wait(); NeoConfig.ConfigureModel(); } diff --git a/test/Neo4jClient.Extension.IntegrationTest/Neo4jClient.Extension.IntegrationTest.csproj b/test/Neo4jClient.Extension.IntegrationTest/Neo4jClient.Extension.IntegrationTest.csproj index 4cee7c7..b5f9251 100644 --- a/test/Neo4jClient.Extension.IntegrationTest/Neo4jClient.Extension.IntegrationTest.csproj +++ b/test/Neo4jClient.Extension.IntegrationTest/Neo4jClient.Extension.IntegrationTest.csproj @@ -1,5 +1,7 @@  + + Debug @@ -9,9 +11,11 @@ Properties Neo4jClient.Extension.Test.Integration Neo4jClient.Extension.Test.Integration - v4.5 + v4.7.2 512 + + true @@ -31,21 +35,91 @@ 4 - - ..\..\packages\Neo4jClient.1.1.0.1\lib\net45\Neo4jClient.dll - True + + + ..\..\packages\Neo4j.Driver.Signed.4.2.0\lib\netstandard2.0\Neo4j.Driver.dll - - ..\..\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll - True + + ..\..\packages\Neo4jClient.4.1.6\lib\netstandard2.0\Neo4jClient.dll - - ..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll - True + + ..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + + + ..\..\packages\NUnit.3.13.1\lib\net45\nunit.framework.dll + + ..\..\packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll + + + + + ..\..\packages\System.IO.4.3.0\lib\net462\System.IO.dll + True + True + + + ..\..\packages\System.Net.NameResolution.4.3.0\lib\net46\System.Net.NameResolution.dll + True + True + + + ..\..\packages\System.Net.Security.4.3.2\lib\net46\System.Net.Security.dll + True + True + + + ..\..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll + True + True + + + ..\..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll + True + True + + + ..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + True + True + + + + ..\..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll + True + True + + + ..\..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll + True + True + + + ..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll + True + True + + + ..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll + True + True + + + ..\..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll + True + True + + + ..\..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll + True + True + + + ..\..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + @@ -71,11 +145,11 @@ - {6d2502f8-f491-45e6-abd8-2f7407926f5a} + {d8e8001f-d6fa-44d2-933e-9bdaadf45cfb} Neo4jClient.Extension.Attributes - {41c65bed-56a6-4942-95d2-10e62f607c7f} + {6c3e1f7b-26fd-4d71-8af6-a24985d4217b} Neo4jClient.Extension @@ -89,6 +163,13 @@ + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + +