Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

Commit

Permalink
Add extension method for missing Stream.Close() in .NET Core
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Sep 2, 2016
1 parent 12b28a1 commit 0b6a694
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .gitignore
Expand Up @@ -43,9 +43,10 @@ App_Data/
*.suo
*.user
.vs/
.vscode/
*.lock.json

.vscode/
*.lock.json
*.nuget.props
*.nuget.targets
NuGet/
NuGet.Pcl/
NuGet.Signed/
Expand Down
8 changes: 8 additions & 0 deletions src/ServiceStack.Text/StreamExtensions.cs
Expand Up @@ -284,5 +284,13 @@ public static byte[] Combine(this byte[] bytes, params byte[][] withBytes)

return to;
}

#if NETSTANDARD1_1
public static void Close(this Stream stream)
{
stream.Dispose();
}
#endif

}
}

0 comments on commit 0b6a694

Please sign in to comment.