Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,4 @@ UpgradeLog*.htm
# Microsoft Fakes
FakesAssemblies/
.vs/config/applicationhost.config
/.vs
31 changes: 17 additions & 14 deletions Neo4jClient.Extension.sln
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -1,79 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6D2502F8-F491-45E6-ABD8-2F7407926F5A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Neo4jClient.Extension.Attributes</RootNamespace>
<AssemblyName>Neo4jClient.Extension.Attributes</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>Neo4jClient.Extension.Attributes.NetStandard</PackageId>
<Authors>Simon Pinn, Yann ROBIN</Authors>
<Description>Extending the awesome Neo4jClient, provides just the attributes required by Neo4jClient.Extension to allow class libraries to remove dependency on Neo4jClient</Description>
<PackageTags>Neo4j Neo4jClient GraphDb GraphData</PackageTags>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Neo4jClient, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Neo4jClient.1.1.0.1\lib\net45\Neo4jClient.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\SolutionItems\Properties\AssemblyInfoGlobal.cs">
<Link>Properties\AssemblyInfoGlobal.cs</Link>
</Compile>
<Compile Include="CypherExtensionAttribute.cs" />
<Compile Include="CypherLabelAttribute.cs" />
<Compile Include="CypherMatchAttribute.cs" />
<Compile Include="CypherMergeAttribute.cs" />
<Compile Include="CypherMergeOnCreateAttribute.cs" />
<Compile Include="CypherMergeOnMatchAttribute.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Neo4jClient.Extension.Attributes.nuspec" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
<Error Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

</Project>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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")]
5 changes: 0 additions & 5 deletions src/Neo4jClient.Extension.Attributes/packages.config

This file was deleted.

2 changes: 1 addition & 1 deletion src/Neo4jClient.Extension/Cypher/CypherExtensionContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static CypherExtensionContext Create(ICypherFluentQuery query)

public CypherExtensionContext()
{
JsonContractResolver = new CamelCasePropertyNamesContractResolver();
JsonContractResolver = GraphClient.DefaultJsonContractResolver;
}

public IContractResolver JsonContractResolver { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}

Expand Down Expand Up @@ -74,7 +74,7 @@ internal static string GetMatchCypher<TEntity>(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);
Expand Down
Loading