Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support .net framework 4.5 alongside .net standard 1.3 platforms #207

Merged
merged 6 commits into from
Aug 1, 2017
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,13 @@ public void Close()
public Task CloseAsync()
{
Close();
return Task.CompletedTask; // TODO verify this is the correct way to do it

// TODO verify this is the correct way to do it
#if NET45
return Task.FromResult(0);
#else
return Task.CompletedTask;
#endif
}

private void AssertNoServerFailure()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ protected virtual void Dispose(bool isDisposing)
private void Close()
{
_stream?.Dispose();

#if NET45
_client?.Close();
#else
_client?.Dispose();
#endif
}

/// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary>
Expand Down
4 changes: 4 additions & 0 deletions Neo4j.Driver/Neo4j.Driver/Internal/Transaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,11 @@ public override void Close()
public override Task CloseAsync()
{
Close();
#if NET45
return Task.FromResult(0);
#else
return Task.CompletedTask;
#endif
}

public override void OnError(Exception error)
Expand Down
10 changes: 4 additions & 6 deletions Neo4j.Driver/Neo4j.Driver/Neo4j.Driver.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard1.3;net46</TargetFrameworks>
<TargetFrameworks>netstandard1.3;net45</TargetFrameworks>
<AssemblyName>Neo4j.Driver</AssemblyName>
<PackageId>Neo4j.Driver</PackageId>
<Authors>Neo4j</Authors>
Expand Down Expand Up @@ -32,14 +32,12 @@
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard1.3|AnyCPU'">
<DocumentationFile>bin\Release\netstandard1.3\Neo4j.Driver.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
<PackageReference Include="System.Net.Security" Version="4.3.1" />
<PackageReference Include="System.Net.Sockets" Version="4.3.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
<PackageReference Include="System.Net.Security" Version="4.3.1" />
<PackageReference Include="System.Net.Sockets" Version="4.3.0" />
</ItemGroup>

</Project>