diff --git a/Directory.Build.props b/Directory.Build.props index c534bff7e..5c261f63f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -17,10 +17,8 @@ 2.59.0 - - - - - - + + + + diff --git a/src/EventStore.Client.Common/EpochExtensions.cs b/src/EventStore.Client.Common/EpochExtensions.cs index e4d84dede..fa500cdd0 100644 --- a/src/EventStore.Client.Common/EpochExtensions.cs +++ b/src/EventStore.Client.Common/EpochExtensions.cs @@ -1,25 +1,21 @@ using System; -namespace EventStore.Client { - internal static class EpochExtensions { - private const long TicksPerMillisecond = 10000; - private const long TicksPerSecond = TicksPerMillisecond * 1000; - private const long TicksPerMinute = TicksPerSecond * 60; - private const long TicksPerHour = TicksPerMinute * 60; - private const long TicksPerDay = TicksPerHour * 24; - private const int DaysPerYear = 365; - private const int DaysPer4Years = DaysPerYear * 4 + 1; - private const int DaysPer100Years = DaysPer4Years * 25 - 1; - private const int DaysPer400Years = DaysPer100Years * 4 + 1; - private const int DaysTo1970 = DaysPer400Years * 4 + DaysPer100Years * 3 + DaysPer4Years * 17 + DaysPerYear; - private const long UnixEpochTicks = DaysTo1970 * TicksPerDay; +static class EpochExtensions { + private const long TicksPerMillisecond = 10000; + private const long TicksPerSecond = TicksPerMillisecond * 1000; + private const long TicksPerMinute = TicksPerSecond * 60; + private const long TicksPerHour = TicksPerMinute * 60; + private const long TicksPerDay = TicksPerHour * 24; + private const int DaysPerYear = 365; + private const int DaysPer4Years = DaysPerYear * 4 + 1; + private const int DaysPer100Years = DaysPer4Years * 25 - 1; + private const int DaysPer400Years = DaysPer100Years * 4 + 1; + private const int DaysTo1970 = DaysPer400Years * 4 + DaysPer100Years * 3 + DaysPer4Years * 17 + DaysPerYear; + private const long UnixEpochTicks = DaysTo1970 * TicksPerDay; - private static readonly DateTime UnixEpoch = new(UnixEpochTicks, DateTimeKind.Utc); + private static readonly DateTime UnixEpoch = new(UnixEpochTicks, DateTimeKind.Utc); - public static DateTime FromTicksSinceEpoch(this long value) => - new DateTime(UnixEpoch.Ticks + value, DateTimeKind.Utc); + private static readonly DateTime UnixEpoch = new(UnixEpochTicks, DateTimeKind.Utc); - public static long ToTicksSinceEpoch(this DateTime value) => - (value - UnixEpoch).Ticks; - } + public static long ToTicksSinceEpoch(this DateTime value) => (value - UnixEpoch).Ticks; } diff --git a/src/EventStore.Client.Common/Shims/TaskCompletionSource.cs b/src/EventStore.Client.Common/Shims/TaskCompletionSource.cs index 5e23aa609..e7e88a97f 100644 --- a/src/EventStore.Client.Common/Shims/TaskCompletionSource.cs +++ b/src/EventStore.Client.Common/Shims/TaskCompletionSource.cs @@ -1,5 +1,5 @@ #if !NET -namespace System.Threading.Tasks; +namespace System.Threading.Tasks; internal class TaskCompletionSource : TaskCompletionSource { public void SetResult() => base.SetResult(null); diff --git a/src/EventStore.Client.ProjectionManagement/EventStoreProjectionManagementClient.State.cs b/src/EventStore.Client.ProjectionManagement/EventStoreProjectionManagementClient.State.cs index 73895e52e..64187fe1f 100644 --- a/src/EventStore.Client.ProjectionManagement/EventStoreProjectionManagementClient.State.cs +++ b/src/EventStore.Client.ProjectionManagement/EventStoreProjectionManagementClient.State.cs @@ -31,7 +31,6 @@ public async Task GetResultAsync(string name, string? partition = #else using var stream = new MemoryStream(); #endif - await using var writer = new Utf8JsonWriter(stream); var serializer = new ValueSerializer(); serializer.Write(writer, value, DefaultJsonSerializerOptions); @@ -58,13 +57,11 @@ public async Task GetResultAsync(string name, string? partition = null, CancellationToken cancellationToken = default) { var value = await GetResultInternalAsync(name, partition, deadline, userCredentials, cancellationToken) .ConfigureAwait(false); - #if NET await using var stream = new MemoryStream(); #else using var stream = new MemoryStream(); #endif - await using var writer = new Utf8JsonWriter(stream); var serializer = new ValueSerializer(); serializer.Write(writer, value, DefaultJsonSerializerOptions); @@ -109,7 +106,6 @@ public async Task GetStateAsync(string name, string? partition = n #else using var stream = new MemoryStream(); #endif - await using var writer = new Utf8JsonWriter(stream); var serializer = new ValueSerializer(); serializer.Write(writer, value, DefaultJsonSerializerOptions); @@ -141,7 +137,6 @@ public async Task GetStateAsync(string name, string? partition = null, #else using var stream = new MemoryStream(); #endif - await using var writer = new Utf8JsonWriter(stream); var serializer = new ValueSerializer(); serializer.Write(writer, value, DefaultJsonSerializerOptions); diff --git a/src/EventStore.Client.Streams/EventStore.Client.Streams.csproj b/src/EventStore.Client.Streams/EventStore.Client.Streams.csproj index 3c541daff..41ccec721 100644 --- a/src/EventStore.Client.Streams/EventStore.Client.Streams.csproj +++ b/src/EventStore.Client.Streams/EventStore.Client.Streams.csproj @@ -3,10 +3,8 @@ The GRPC client API for Event Store Streams. Get the open source or commercial versions of Event Store server from https://eventstore.com/ - - diff --git a/src/EventStore.Client.Streams/EventStoreClient.Append.cs b/src/EventStore.Client.Streams/EventStoreClient.Append.cs index 6a9149f04..ca9cae353 100644 --- a/src/EventStore.Client.Streams/EventStoreClient.Append.cs +++ b/src/EventStore.Client.Streams/EventStoreClient.Append.cs @@ -9,6 +9,8 @@ using EventStore.Client.Streams; using Grpc.Core; using Microsoft.Extensions.Logging; +using System.Runtime.CompilerServices; + namespace EventStore.Client { public partial class EventStoreClient { /// @@ -340,16 +342,15 @@ public void Dispose() { _channel.Writer.TryComplete(); } } - - private static async IAsyncEnumerable ReadAllAsync(ChannelReader reader, [EnumeratorCancellation] CancellationToken cancellationToken = default) - { - while (await reader.WaitToReadAsync(cancellationToken).ConfigureAwait(false)) - { - while (reader.TryRead(out T? item)) - { - yield return item; - } - } - } + private static async IAsyncEnumerable ReadAllAsync(ChannelReader reader, [EnumeratorCancellation] CancellationToken cancellationToken = default) + { + while (await reader.WaitToReadAsync(cancellationToken).ConfigureAwait(false)) + { + while (reader.TryRead(out T? item)) + { + yield return item; + } + } + } } } diff --git a/src/EventStore.Client/EventStoreClientSettings.ConnectionString.cs b/src/EventStore.Client/EventStoreClientSettings.ConnectionString.cs index d65b45030..37d9da65b 100644 --- a/src/EventStore.Client/EventStoreClientSettings.ConnectionString.cs +++ b/src/EventStore.Client/EventStoreClientSettings.ConnectionString.cs @@ -105,11 +105,13 @@ public static EventStoreClientSettings Parse(string connectionString) { return CreateSettings(scheme, userInfo, hosts, options); } - private static EventStoreClientSettings CreateSettings(string scheme, (string user, string pass)? userInfo, - EndPoint[] hosts, Dictionary options) { + private static EventStoreClientSettings CreateSettings( + string scheme, (string user, string pass)? userInfo, + EndPoint[] hosts, Dictionary options + ) { var settings = new EventStoreClientSettings { ConnectivitySettings = EventStoreClientConnectivitySettings.Default, - OperationOptions = EventStoreClientOperationOptions.Default + OperationOptions = EventStoreClientOperationOptions.Default }; if (userInfo.HasValue) @@ -119,13 +121,16 @@ private static EventStoreClientSettings CreateSettings(string scheme, (string us foreach (var kv in options) { if (!SettingsType.TryGetValue(kv.Key, out var type)) throw new InvalidSettingException($"Unknown option: {kv.Key}"); + if (type == typeof(int)) { if (!int.TryParse(kv.Value, out var intValue)) throw new InvalidSettingException($"{kv.Key} must be an integer value"); + typedOptions.Add(kv.Key, intValue); } else if (type == typeof(bool)) { if (!bool.TryParse(kv.Value, out var boolValue)) throw new InvalidSettingException($"{kv.Key} must be either true or false"); + typedOptions.Add(kv.Key, boolValue); } else if (type == typeof(string)) { typedOptions.Add(kv.Key, kv.Value); @@ -199,11 +204,11 @@ private static EventStoreClientSettings CreateSettings(string scheme, (string us settings.ConnectivitySettings.TlsVerifyCert = (bool)tlsVerifyCert; } - settings.CreateHttpMessageHandler = CreateDefaultHandler; + settings.CreateHttpMessageHandler = CreateDefaultHandler; return settings; - HttpMessageHandler CreateDefaultHandler() { + HttpMessageHandler CreateDefaultHandler() { #if NET var handler = new SocketsHttpHandler { KeepAlivePingDelay = settings.ConnectivitySettings.KeepAliveInterval, @@ -215,19 +220,19 @@ HttpMessageHandler CreateDefaultHandler() { handler.SslOptions.RemoteCertificateValidationCallback = delegate { return true; }; } #else - var handler = new WinHttpHandler { - TcpKeepAliveEnabled = true, - TcpKeepAliveTime = settings.ConnectivitySettings.KeepAliveTimeout, - TcpKeepAliveInterval = settings.ConnectivitySettings.KeepAliveInterval, - EnableMultipleHttp2Connections = true - }; - + var handler = new WinHttpHandler { + TcpKeepAliveEnabled = true, + TcpKeepAliveTime = settings.ConnectivitySettings.KeepAliveTimeout, + TcpKeepAliveInterval = settings.ConnectivitySettings.KeepAliveInterval, + EnableMultipleHttp2Connections = true + }; + if (!settings.ConnectivitySettings.TlsVerifyCert) { handler.ServerCertificateValidationCallback = delegate { return true; }; } #endif return handler; - } + } } private static string ParseScheme(string s) => diff --git a/src/EventStore.Client/Uuid.cs b/src/EventStore.Client/Uuid.cs index ded74ab0b..ff0c85df8 100644 --- a/src/EventStore.Client/Uuid.cs +++ b/src/EventStore.Client/Uuid.cs @@ -82,11 +82,11 @@ private Uuid(Guid value) { _lsb = BitConverterToInt64(data[8..]); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static long BitConverterToInt64(ReadOnlySpan value) - => Unsafe.ReadUnaligned(ref MemoryMarshal.GetReference(value)); + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static long BitConverterToInt64(ReadOnlySpan value) + => Unsafe.ReadUnaligned(ref MemoryMarshal.GetReference(value)); - private Uuid(string value) : this(value == null + private Uuid(string value) : this(value == null ? throw new ArgumentNullException(nameof(value)) : Guid.Parse(value)) { } @@ -104,7 +104,7 @@ public UUID ToDto() => new UUID { Structured = new UUID.Types.Structured { LeastSignificantBits = _lsb, - MostSignificantBits = _msb + MostSignificantBits = _msb } }; @@ -168,7 +168,29 @@ public Guid ToGuid() { #if NET return new Guid(data); #else - return new Guid(data.ToArray()); + return new Guid(data.ToArray()); +#endif + } + private static bool TryWriteBytes(Span destination, long value) + { + if (destination.Length < sizeof(long)) + return false; + + Unsafe.WriteUnaligned(ref MemoryMarshal.GetReference(destination), value); + return true; + } + + private bool TryWriteGuidBytes(Guid value, Span destination) + { +#if NET + return value.TryWriteBytes(destination); +#else + if (destination.Length < 16) + return false; + + var bytes = value.ToByteArray(); + bytes.CopyTo(destination); + return true; #endif } diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 796b535a3..12e2cd057 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -29,7 +29,11 @@ - - - + + + + + + + diff --git a/test/EventStore.Client.PersistentSubscriptions.Tests/SubscriptionToAll/get_info.cs b/test/EventStore.Client.PersistentSubscriptions.Tests/SubscriptionToAll/get_info.cs index c7eca49a6..ca3afffd6 100644 --- a/test/EventStore.Client.PersistentSubscriptions.Tests/SubscriptionToAll/get_info.cs +++ b/test/EventStore.Client.PersistentSubscriptions.Tests/SubscriptionToAll/get_info.cs @@ -164,14 +164,14 @@ await Client.SubscribeToAllAsync( (s, e, r, ct) => { counter++; - switch (counter) { - case 1: s.Nack(PersistentSubscriptionNakEventAction.Park, "Test", e); - break; - case > 10: - tcs.TrySetResult(); - break; - } - return Task.CompletedTask; + switch (counter) { + case 1: s.Nack(PersistentSubscriptionNakEventAction.Park, "Test", e); + break; + case > 10: + tcs.TrySetResult(); + break; + } + return Task.CompletedTask; }, userCredentials: TestCredentials.Root ); diff --git a/test/EventStore.Client.Streams.Tests/EventStore.Client.Streams.Tests.csproj b/test/EventStore.Client.Streams.Tests/EventStore.Client.Streams.Tests.csproj index 96cea21bb..18e956804 100644 --- a/test/EventStore.Client.Streams.Tests/EventStore.Client.Streams.Tests.csproj +++ b/test/EventStore.Client.Streams.Tests/EventStore.Client.Streams.Tests.csproj @@ -6,7 +6,7 @@ - - - + + + diff --git a/test/EventStore.Client.Tests.Common/ApplicationInfo.cs b/test/EventStore.Client.Tests.Common/ApplicationInfo.cs index c55f90d50..0120c21b4 100644 --- a/test/EventStore.Client.Tests.Common/ApplicationInfo.cs +++ b/test/EventStore.Client.Tests.Common/ApplicationInfo.cs @@ -23,17 +23,17 @@ static Application() { Environment = GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? Environments.Development; - var builder = new ConfigurationBuilder() - .AddJsonFile("appsettings.json", true) - .AddJsonFile($"appsettings.{Environment}.json", true) // Accept default naming convention - .AddJsonFile($"appsettings.{Environment.ToLowerInvariant()}.json", true) // Linux is case sensitive - .AddEnvironmentVariables(); + var builder = new ConfigurationBuilder() + .AddJsonFile("appsettings.json", true) + .AddJsonFile($"appsettings.{Environment}.json", true) // Accept default naming convention + .AddJsonFile($"appsettings.{Environment.ToLowerInvariant()}.json", true) // Linux is case sensitive + .AddEnvironmentVariables(); Configuration = builder.Build(); WriteLine($"APP: {Environment} configuration loaded " + $"with {Configuration.AsEnumerable().Count()} entries " - + $"from {builder.Sources.Count} sources."); + + $"from {builder.Sources.Count()} sources."); IsDevelopment = IsEnvironment(Environments.Development); IsStaging = IsEnvironment(Environments.Staging); diff --git a/test/EventStore.Client.Tests.Common/EventStore.Client.Tests.Common.csproj b/test/EventStore.Client.Tests.Common/EventStore.Client.Tests.Common.csproj index fa5b5c972..42ca04a99 100644 --- a/test/EventStore.Client.Tests.Common/EventStore.Client.Tests.Common.csproj +++ b/test/EventStore.Client.Tests.Common/EventStore.Client.Tests.Common.csproj @@ -26,6 +26,8 @@ + + diff --git a/test/EventStore.Client.Tests.Common/Fixtures/Base/EventStoreTestServer.cs b/test/EventStore.Client.Tests.Common/Fixtures/Base/EventStoreTestServer.cs index 8098f4974..fb7e5f601 100644 --- a/test/EventStore.Client.Tests.Common/Fixtures/Base/EventStoreTestServer.cs +++ b/test/EventStore.Client.Tests.Common/Fixtures/Base/EventStoreTestServer.cs @@ -26,17 +26,17 @@ public EventStoreTestServer( VerifyCertificatesExist(); #if NET - _httpClient = new HttpClient(new SocketsHttpHandler { - SslOptions = {RemoteCertificateValidationCallback = delegate { return true; }} - }) { - BaseAddress = address, - }; + _httpClient = new HttpClient(new SocketsHttpHandler { + SslOptions = {RemoteCertificateValidationCallback = delegate { return true; }} + }) { + BaseAddress = address, + }; #else - _httpClient = new HttpClient(new WinHttpHandler { - ServerCertificateValidationCallback = delegate { return true; } - }) { - BaseAddress = address, - }; + _httpClient = new HttpClient(new WinHttpHandler { + ServerCertificateValidationCallback = delegate { return true; } + }) { + BaseAddress = address, + }; #endif var env = new Dictionary { @@ -53,9 +53,8 @@ public EventStoreTestServer( ["EVENTSTORE_DISABLE_LOG_FILE"] = "true" }; - foreach (var val in envOverrides ?? Enumerable.Empty>()) { - env[val.Key] = val.Value; - } + foreach (var val in envOverrides ?? Enumerable.Empty>()) + env[val.Key] = val.Value; _eventStore = new Builder() .UseContainer() @@ -98,7 +97,7 @@ public ValueTask DisposeAsync() { _eventStore?.Dispose(); return new ValueTask(Task.CompletedTask); - } + } static Version GetVersion() { const string versionPrefix = "EventStoreDB version"; diff --git a/test/EventStore.Client.Tests.Common/Fixtures/Base/EventStoreTestServerCluster.cs b/test/EventStore.Client.Tests.Common/Fixtures/Base/EventStoreTestServerCluster.cs index 67ca48d31..ceb263e15 100644 --- a/test/EventStore.Client.Tests.Common/Fixtures/Base/EventStoreTestServerCluster.cs +++ b/test/EventStore.Client.Tests.Common/Fixtures/Base/EventStoreTestServerCluster.cs @@ -23,17 +23,17 @@ public EventStoreTestServerCluster( _eventStoreCluster = BuildCluster(envOverrides); #if NET - _httpClient = new HttpClient(new SocketsHttpHandler { - SslOptions = {RemoteCertificateValidationCallback = delegate { return true; }} - }) { - BaseAddress = address, - }; + _httpClient = new HttpClient(new SocketsHttpHandler { + SslOptions = {RemoteCertificateValidationCallback = delegate { return true; }} + }) { + BaseAddress = address, + }; #else - _httpClient = new HttpClient(new WinHttpHandler { - ServerCertificateValidationCallback = delegate { return true; } - }) { - BaseAddress = address, - }; + _httpClient = new HttpClient(new WinHttpHandler { + ServerCertificateValidationCallback = delegate { return true; } + }) { + BaseAddress = address, + }; #endif } diff --git a/test/EventStore.Client.Tests.Common/Fixtures/EventStoreTestCluster.cs b/test/EventStore.Client.Tests.Common/Fixtures/EventStoreTestCluster.cs index 5c366e8d0..682995ae6 100644 --- a/test/EventStore.Client.Tests.Common/Fixtures/EventStoreTestCluster.cs +++ b/test/EventStore.Client.Tests.Common/Fixtures/EventStoreTestCluster.cs @@ -47,12 +47,12 @@ protected override CompositeBuilder Configure() { return builder; } - protected override async Task OnServiceStarted() { - #if NET48 + protected override async Task OnServiceStarted() { +#if NET48 Service.WaitUntilNodesAreHealthy("esdb-node", TimeSpan.FromSeconds(60)); - #else +#else await Service.WaitUntilNodesAreHealthy("esdb-node", TimeSpan.FromSeconds(60)); - #endif +#endif await Task.CompletedTask; - } + } } diff --git a/test/EventStore.Client.Tests.Common/FluentDocker/TestBypassService.cs b/test/EventStore.Client.Tests.Common/FluentDocker/TestBypassService.cs index 144f73d5f..3505eb9af 100644 --- a/test/EventStore.Client.Tests.Common/FluentDocker/TestBypassService.cs +++ b/test/EventStore.Client.Tests.Common/FluentDocker/TestBypassService.cs @@ -25,13 +25,7 @@ public override async Task Stop() { } } - public override ValueTask DisposeAsync() { -#if NET - return ValueTask.CompletedTask; -#else - return new ValueTask(); -#endif - } + public override ValueTask DisposeAsync() => new ValueTask(); } public sealed class BypassService : IService { diff --git a/test/EventStore.Client.Tests.Common/FluentDocker/TestService.cs b/test/EventStore.Client.Tests.Common/FluentDocker/TestService.cs index 5816c2a3d..7ed8c3f27 100644 --- a/test/EventStore.Client.Tests.Common/FluentDocker/TestService.cs +++ b/test/EventStore.Client.Tests.Common/FluentDocker/TestService.cs @@ -85,9 +85,9 @@ public virtual async Task Restart(TimeSpan delay) { catch (Exception ex) { throw new FluentDockerException("Failed to stop container service", ex); } - + await Task.Delay(delay); - + Logger.Information("Container service starting..."); try { diff --git a/test/EventStore.Client.Tests/ConnectionStringTests.cs b/test/EventStore.Client.Tests/ConnectionStringTests.cs index 96a5a4eff..37dc64a0f 100644 --- a/test/EventStore.Client.Tests/ConnectionStringTests.cs +++ b/test/EventStore.Client.Tests/ConnectionStringTests.cs @@ -131,14 +131,14 @@ public void tls_verify_cert(bool tlsVerifyCert) { Assert.Null(socketsHandler.SslOptions.RemoteCertificateValidationCallback); } #else - var socketsHandler = Assert.IsType(handler); - if (!tlsVerifyCert) { - Assert.NotNull(socketsHandler.ServerCertificateValidationCallback); - Assert.True(socketsHandler.ServerCertificateValidationCallback!.Invoke(null!, default!, - default!, default)); - } else { - Assert.Null(socketsHandler.ServerCertificateValidationCallback); - } + var socketsHandler = Assert.IsType(handler); + if (!tlsVerifyCert) { + Assert.NotNull(socketsHandler.ServerCertificateValidationCallback); + Assert.True(socketsHandler.ServerCertificateValidationCallback!.Invoke(null!, default!, + default!, default)); + } else { + Assert.Null(socketsHandler.ServerCertificateValidationCallback); + } #endif } @@ -152,14 +152,15 @@ public void infinite_grpc_timeouts() { Assert.Equal(System.Threading.Timeout.InfiniteTimeSpan, result.ConnectivitySettings.KeepAliveTimeout); using var handler = result.CreateHttpMessageHandler?.Invoke(); + #if NET var socketsHandler = Assert.IsType(handler); Assert.Equal(System.Threading.Timeout.InfiniteTimeSpan, socketsHandler.KeepAlivePingTimeout); Assert.Equal(System.Threading.Timeout.InfiniteTimeSpan, socketsHandler.KeepAlivePingDelay); #else - var winHttpHandler = Assert.IsType(handler); - Assert.Equal(System.Threading.Timeout.InfiniteTimeSpan, winHttpHandler.TcpKeepAliveTime); - Assert.Equal(System.Threading.Timeout.InfiniteTimeSpan, winHttpHandler.TcpKeepAliveInterval); + var winHttpHandler = Assert.IsType(handler); + Assert.Equal(System.Threading.Timeout.InfiniteTimeSpan, winHttpHandler.TcpKeepAliveTime); + Assert.Equal(System.Threading.Timeout.InfiniteTimeSpan, winHttpHandler.TcpKeepAliveInterval); #endif } @@ -382,11 +383,13 @@ static string GetKeyValuePairs( if (handler is SocketsHttpHandler socketsHttpHandler && socketsHttpHandler.SslOptions.RemoteCertificateValidationCallback != null) pairs.Add("tlsVerifyCert", "false"); + } #else - if (handler is WinHttpHandler winHttpHandler && - winHttpHandler.ServerCertificateValidationCallback != null) { - pairs.Add("tlsVerifyCert", "false"); - } + if (handler is WinHttpHandler winHttpHandler && + winHttpHandler.ServerCertificateValidationCallback != null) { + pairs.Add("tlsVerifyCert", "false"); + } + } #endif } @@ -488,6 +491,7 @@ public bool Equals(EventStoreClientOperationOptions? x, EventStoreClientOperatio return x.GetType() == y.GetType(); } - public int GetHashCode(EventStoreClientOperationOptions obj) => System.HashCode.Combine(obj.ThrowOnAppendFailure); + public int GetHashCode(EventStoreClientOperationOptions obj) => + System.HashCode.Combine(obj.ThrowOnAppendFailure); } } diff --git a/test/EventStore.Client.Tests/EventStore.Client.Tests.csproj b/test/EventStore.Client.Tests/EventStore.Client.Tests.csproj index 23abbbf34..4ab5fa410 100644 --- a/test/EventStore.Client.Tests/EventStore.Client.Tests.csproj +++ b/test/EventStore.Client.Tests/EventStore.Client.Tests.csproj @@ -25,9 +25,18 @@ + + + + + + + all + runtime; build; native; contentfiles; analyzers + + -