Skip to content

Commit

Permalink
feat: .Net Standard 1.4 is no longer supported #99
Browse files Browse the repository at this point in the history
BREAKING CHANGE
  • Loading branch information
richardschneider committed May 21, 2019
1 parent 1528a2a commit 2afce11
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ This is **BETA CODE** and breaking changes will occur.
- A zero config [pubsub message system](https://richardschneider.github.io/net-ipfs-engine/articles/pubsub.html)
- Targets
- .NET Framework 4.6.1
- .NET Standard 1.4
- .NET Standard 2.0
- Supports [asynchronous I/O](https://richardschneider.github.io/net-ipfs-engine/articles/async.html)
- Supports [cancellation](https://richardschneider.github.io/net-ipfs-engine/articles/cancellation.html)
Expand Down
13 changes: 1 addition & 12 deletions src/CoreApi/FileSystemApi.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !NETSTANDARD14 // TODO
using ICSharpCode.SharpZipLib.Tar;
#endif
using ICSharpCode.SharpZipLib.Tar;
using Common.Logging;
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -232,12 +230,6 @@ public async Task<Stream> ReadFileAsync(string path, long offset, long count = 0
return new SlicedStream(stream, offset, count);
}

#if NETSTANDARD14 // TODO
public Task<Stream> GetAsync(string path, bool compress = false, CancellationToken cancel = default(CancellationToken))
{
throw new NotImplementedException("FileSystem.Api.GetAsync is not implemented on NETSTANDARD 1.4");
}
#else
public async Task<Stream> GetAsync(string path, bool compress = false, CancellationToken cancel = default(CancellationToken))
{
var cid = await ipfs.ResolveIpfsPathToCidAsync(path, cancel).ConfigureAwait(false);
Expand All @@ -251,9 +243,7 @@ public async Task<Stream> GetAsync(string path, bool compress = false, Cancellat
ms.Position = 0;
return ms;
}
#endif

#if !NETSTANDARD14 // TODO
async Task AddTarNodeAsync(Cid cid, string name, TarOutputStream tar, CancellationToken cancel)
{
var block = await ipfs.Block.GetAsync(cid, cancel).ConfigureAwait(false);
Expand Down Expand Up @@ -301,7 +291,6 @@ async Task AddTarNodeAsync(Cid cid, string name, TarOutputStream tar, Cancellati
}
}

#endif

IBlockApi GetBlockService(AddFileOptions options)
{
Expand Down
7 changes: 2 additions & 5 deletions src/IpfsEngine.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;netstandard14;netstandard2</TargetFrameworks>
<TargetFrameworks>net461;netstandard2</TargetFrameworks>
<AssemblyName>Ipfs.Engine</AssemblyName>
<RootNamespace>Ipfs.Engine</RootNamespace>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
Expand All @@ -20,17 +20,14 @@
<Description>An embedded IPFS engine for .Net</Description>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReleaseNotes>https://github.com/richardschneider/net-ipfs-engine/releases</PackageReleaseNotes>
<Copyright>© 2018 Richard Schneider</Copyright>
<Copyright>© 2018-2019 Richard Schneider</Copyright>
<PackageTags>ipfs peer-to-peer p2p distributed file-system web</PackageTags>
<IncludeSymbols>True</IncludeSymbols>
<PackageLicenseUrl>https://github.com/richardschneider/net-ipfs-engine/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/richardschneider/net-ipfs-engine</PackageProjectUrl>
<PackageIconUrl>https://github.com/ipfs/logo/blob/master/platform-icons/osx-menu-bar.png</PackageIconUrl>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard14'">
<DefineConstants>NETSTANDARD14</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2'">
<DefineConstants>NETSTANDARD2</DefineConstants>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/IpfsEngineTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;netcoreapp1.1;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>

<IsPackable>false</IsPackable>
<DebugType>full</DebugType>
Expand Down

0 comments on commit 2afce11

Please sign in to comment.