Skip to content

Commit

Permalink
Merge pull request #579 from Looooong/fix/do-not-place-extention-clas…
Browse files Browse the repository at this point in the history
…ses-in-common-namespace

Do not place extension classes in common namespace
  • Loading branch information
adamhathcock committed Mar 18, 2021
2 parents 020f862 + 237ff9f commit cfef228
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions src/SharpCompress/Polyfills/StreamExtensions.cs
@@ -1,12 +1,14 @@
#if NET461 || NETSTANDARD2_0

using System;
using System.Buffers;
using System.IO;

namespace System.IO
namespace SharpCompress
{
public static class StreamExtensions
internal static class StreamExtensions
{
public static int Read(this Stream stream, Span<byte> buffer)
internal static int Read(this Stream stream, Span<byte> buffer)
{
byte[] temp = ArrayPool<byte>.Shared.Rent(buffer.Length);

Expand All @@ -24,7 +26,7 @@ public static int Read(this Stream stream, Span<byte> buffer)
}
}

public static void Write(this Stream stream, ReadOnlySpan<byte> buffer)
internal static void Write(this Stream stream, ReadOnlySpan<byte> buffer)
{
byte[] temp = ArrayPool<byte>.Shared.Rent(buffer.Length);

Expand Down
8 changes: 4 additions & 4 deletions src/SharpCompress/Polyfills/StringExtensions.cs
@@ -1,15 +1,15 @@
#if NET461 || NETSTANDARD2_0

namespace System
namespace SharpCompress
{
public static class StringExtensions
internal static class StringExtensions
{
public static bool EndsWith(this string text, char value)
internal static bool EndsWith(this string text, char value)
{
return text.Length > 0 && text[text.Length - 1] == value;
}

public static bool Contains(this string text, char value)
internal static bool Contains(this string text, char value)
{
return text.IndexOf(value) > -1;
}
Expand Down

0 comments on commit cfef228

Please sign in to comment.