diff --git a/FollowingFileStream/AsyncStream.cs b/FollowingFileStream/AsyncStream.cs index 391c811..dcb12c8 100644 --- a/FollowingFileStream/AsyncStream.cs +++ b/FollowingFileStream/AsyncStream.cs @@ -11,6 +11,7 @@ namespace Manandre.IO /// public abstract class AsyncStream : Stream { +#if !NETSTANDARD1_3 /// /// Begins an asynchronous read operation. (Consider using AsyncStream.ReadAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken) /// instead.) @@ -131,6 +132,7 @@ public sealed override void EndWrite(IAsyncResult asyncResult) { ((Task)asyncResult).GetAwaiter().GetResult(); } +#endif /// /// Clears all buffers for this stream and causes diff --git a/FollowingFileStream/FollowingFileStream.cs b/FollowingFileStream/FollowingFileStream.cs index 3a3a7aa..027435f 100644 --- a/FollowingFileStream/FollowingFileStream.cs +++ b/FollowingFileStream/FollowingFileStream.cs @@ -294,8 +294,7 @@ private bool IsFileLockedForWriting() } finally { - if (stream != null) - stream.Close(); + stream?.Dispose(); } //file is not locked diff --git a/FollowingFileStream/FollowingFileStream.csproj b/FollowingFileStream/FollowingFileStream.csproj index c4d5e25..51ed82b 100644 --- a/FollowingFileStream/FollowingFileStream.csproj +++ b/FollowingFileStream/FollowingFileStream.csproj @@ -1,7 +1,7 @@ Library - netcoreapp2.2 + netstandard2.0;netstandard1.3 bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml