From ee565e6bb43416dc98a6122c33bddb7c270ddbc7 Mon Sep 17 00:00:00 2001 From: Eduard Dumitru Date: Thu, 27 Jun 2024 23:56:00 +0200 Subject: [PATCH] reduce public api 1st round --- src/UiPath.CoreIpc.Tests/NestedStreamTests.cs | 2 +- src/UiPath.CoreIpc/Helpers.cs | 6 +++--- src/UiPath.CoreIpc/NestedStream.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/UiPath.CoreIpc.Tests/NestedStreamTests.cs b/src/UiPath.CoreIpc.Tests/NestedStreamTests.cs index a19afc50..a96af00a 100644 --- a/src/UiPath.CoreIpc.Tests/NestedStreamTests.cs +++ b/src/UiPath.CoreIpc.Tests/NestedStreamTests.cs @@ -358,7 +358,7 @@ public async Task ReadAsync_ValidatesArguments() await Assert.ThrowsAsync(() => this.stream.ReadAsync(buffer, 1, buffer.Length)); } } -public static class StreamExtensions +internal static class StreamExtensions { /// /// Creates a that can read no more than a given number of bytes from an underlying stream. diff --git a/src/UiPath.CoreIpc/Helpers.cs b/src/UiPath.CoreIpc/Helpers.cs index 7abe2292..e25f8777 100644 --- a/src/UiPath.CoreIpc/Helpers.cs +++ b/src/UiPath.CoreIpc/Helpers.cs @@ -8,7 +8,7 @@ using System.Security.Principal; namespace UiPath.Ipc; using static CancellationTokenSourcePool; -public static class Helpers +internal static class Helpers { public const BindingFlags InstanceFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly; #if NET461 @@ -167,7 +167,7 @@ private static async ValueTask WriteMessageCore(this Stream stream, RecyclableMe internal static Task WriteBuffer(this Stream stream, byte[] buffer, CancellationToken cancellationToken) => stream.WriteAsync(buffer, 0, buffer.Length, cancellationToken); } -public static class Validator +internal static class Validator { public static void Validate(ServiceHostBuilder serviceHostBuilder) { @@ -267,7 +267,7 @@ private static void CheckDerivedStream(MethodInfo method, Type type) } } } -public readonly struct TimeoutHelper : IDisposable +internal readonly struct TimeoutHelper : IDisposable { private static readonly Action LinkedTokenCancelDelegate = static s => ((CancellationTokenSource)s).Cancel(); private readonly PooledCancellationTokenSource _timeoutCancellationSource; diff --git a/src/UiPath.CoreIpc/NestedStream.cs b/src/UiPath.CoreIpc/NestedStream.cs index 3dfaa718..2e69166e 100644 --- a/src/UiPath.CoreIpc/NestedStream.cs +++ b/src/UiPath.CoreIpc/NestedStream.cs @@ -4,7 +4,7 @@ /// A stream that allows for reading from another stream up to a given number of bytes. /// https://github.com/AArnott/Nerdbank.Streams/blob/3303c541c29b979f61c86c3c2ed5c0e7372d7a55/src/Nerdbank.Streams/NestedStream.cs#L18 /// -public class NestedStream : Stream +internal class NestedStream : Stream { /// /// The stream to read from.