From d687e5d324c92d3b2d9a82cfa81a680b2c6f5164 Mon Sep 17 00:00:00 2001 From: Michael Southeren Date: Fri, 8 Nov 2019 13:57:53 +1000 Subject: [PATCH] aspnetcore30: Update ASPNETCORE and Orleans 3.0.0 --- ...treams.RabbitMqStreamProvider.Tests.csproj | 13 +++++-------- .../TestCluster.cs | 2 -- ...eans.Streams.RabbitMqStreamProvider.csproj | 4 ++-- .../RabbitMqStreamBuilder.cs | 19 +++++++++++-------- appveyor.yml | 2 +- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/Orleans.Streams.RabbitMqStreamProvider.Tests/Orleans.Streams.RabbitMqStreamProvider.Tests.csproj b/Orleans.Streams.RabbitMqStreamProvider.Tests/Orleans.Streams.RabbitMqStreamProvider.Tests.csproj index 0667c5b..8199fcb 100755 --- a/Orleans.Streams.RabbitMqStreamProvider.Tests/Orleans.Streams.RabbitMqStreamProvider.Tests.csproj +++ b/Orleans.Streams.RabbitMqStreamProvider.Tests/Orleans.Streams.RabbitMqStreamProvider.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.2 + netcoreapp3.0 false false @@ -11,19 +11,16 @@ - + all runtime; build; native; contentfiles; analyzers - - - - - + + + - diff --git a/Orleans.Streams.RabbitMqStreamProvider.Tests/TestCluster.cs b/Orleans.Streams.RabbitMqStreamProvider.Tests/TestCluster.cs index 325aff3..660bf9f 100644 --- a/Orleans.Streams.RabbitMqStreamProvider.Tests/TestCluster.cs +++ b/Orleans.Streams.RabbitMqStreamProvider.Tests/TestCluster.cs @@ -67,7 +67,6 @@ public static async Task Create() .UseLocalhostClustering(siloPort: 11111, gatewayPort: 30000) .Configure(options => { - options.ExpectedClusterSize = 2; options.UseLivenessGossip = true; options.ProbeTimeout = TimeSpan.FromSeconds(5); options.NumMissedProbesLimit = 3; @@ -80,7 +79,6 @@ public static async Task Create() primarySiloEndpoint: new IPEndPoint(IPAddress.Loopback, EndpointOptions.DEFAULT_SILO_PORT)) .Configure(options => { - options.ExpectedClusterSize = 2; options.UseLivenessGossip = true; options.ProbeTimeout = TimeSpan.FromSeconds(5); options.NumMissedProbesLimit = 3; diff --git a/Orleans.Streams.RabbitMqStreamProvider/Orleans.Streams.RabbitMqStreamProvider.csproj b/Orleans.Streams.RabbitMqStreamProvider/Orleans.Streams.RabbitMqStreamProvider.csproj index e004f90..e1d375f 100755 --- a/Orleans.Streams.RabbitMqStreamProvider/Orleans.Streams.RabbitMqStreamProvider.csproj +++ b/Orleans.Streams.RabbitMqStreamProvider/Orleans.Streams.RabbitMqStreamProvider.csproj @@ -1,11 +1,11 @@ - + netstandard2.0 - + diff --git a/Orleans.Streams.RabbitMqStreamProvider/RabbitMqStreamBuilder.cs b/Orleans.Streams.RabbitMqStreamProvider/RabbitMqStreamBuilder.cs index 07b578e..72dc3cf 100644 --- a/Orleans.Streams.RabbitMqStreamProvider/RabbitMqStreamBuilder.cs +++ b/Orleans.Streams.RabbitMqStreamProvider/RabbitMqStreamBuilder.cs @@ -1,17 +1,19 @@ using System; using Microsoft.Extensions.DependencyInjection; using Orleans.Configuration; +using Orleans.Hosting; using Orleans.Streams; using Orleans.Streams.BatchContainer; namespace Orleans.Streaming { - public class SiloRabbitMqStreamConfigurator : SiloPersistentStreamConfigurator where TSerializer : IBatchContainerSerializer, new() + public class SiloRabbitMqStreamConfigurator : SiloPersistentStreamConfigurator + where TSerializer : IBatchContainerSerializer, new() { public SiloRabbitMqStreamConfigurator(string name, Action> configureDelegate) : base(name, configureDelegate, RabbitMqAdapterFactory.Create) { - this.configureDelegate(services => + ConfigureDelegate(services => { services.ConfigureNamedOptionForLogging(name) .AddTransient(sp => new RabbitMqOptionsValidator(sp.GetOptionsByName(name), name)) @@ -22,7 +24,7 @@ public SiloRabbitMqStreamConfigurator(string name, Action ConfigureRabbitMq(string host, int port, string virtualHost, string user, string password, string queueName, bool useQueuePartitioning = RabbitMqOptions.DefaultUseQueuePartitioning, int numberOfQueues = RabbitMqOptions.DefaultNumberOfQueues) { - Configure(ob => ob.Configure(options => + this.Configure(ob => ob.Configure(options => { options.HostName = host; options.Port = port; @@ -38,13 +40,13 @@ public SiloRabbitMqStreamConfigurator ConfigureRabbitMq(string host public SiloRabbitMqStreamConfigurator ConfigureCache(int cacheSize) { - Configure(ob => ob.Configure(options => options.CacheSize = cacheSize)); + this.Configure(ob => ob.Configure(options => options.CacheSize = cacheSize)); return this; } public SiloRabbitMqStreamConfigurator ConfigureCache(int cacheSize, TimeSpan cacheFillingTimeout) { - Configure(ob => ob.Configure(options => + this.Configure(ob => ob.Configure(options => { options.CacheSize = cacheSize; options.CacheFillingTimeout = cacheFillingTimeout; @@ -53,12 +55,13 @@ public SiloRabbitMqStreamConfigurator ConfigureCache(int cacheSize, } } - public class ClusterClientRabbitMqStreamConfigurator : ClusterClientPersistentStreamConfigurator where TSerializer : IBatchContainerSerializer, new() + public class ClusterClientRabbitMqStreamConfigurator : ClusterClientPersistentStreamConfigurator + where TSerializer : IBatchContainerSerializer, new() { public ClusterClientRabbitMqStreamConfigurator(string name, IClientBuilder builder) : base(name, builder, RabbitMqAdapterFactory.Create) { - clientBuilder + builder .ConfigureApplicationParts(parts => parts.AddFrameworkPart(typeof(RabbitMqAdapterFactory).Assembly)) .ConfigureServices(services => services .ConfigureNamedOptionForLogging(name) @@ -72,7 +75,7 @@ public ClusterClientRabbitMqStreamConfigurator ConfigureRabbitMq( bool useQueuePartitioning = RabbitMqOptions.DefaultUseQueuePartitioning, int numberOfQueues = RabbitMqOptions.DefaultNumberOfQueues) { - Configure(ob => ob.Configure(options => + this.Configure(ob => ob.Configure(options => { options.HostName = host; options.Port = port; diff --git a/appveyor.yml b/appveyor.yml index 3615cc1..096cf58 100755 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,7 +18,7 @@ install: - start /B /WAIT %rabbitmq_installer_path% /S - ps: (Get-Service -Name RabbitMQ).Status -version: 2.4.3.{build} +version: 3.0.0.{build} assembly_info: patch: true file: AssemblyInfo.cs