From d211d3310898cd72cb7153eccd551d1d193b62dc Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Thu, 15 Aug 2019 11:32:39 +0200 Subject: [PATCH] [ci skip] Fixed ReSharper code issues (ironically, in JetBrains.Annotations as well) --- Tapeti.Annotations/ReSharper/JetBrains.Annotations.cs | 6 +++--- Tapeti.Flow/Default/FlowStore.cs | 2 +- Tapeti.Flow/ReSharper/JetBrains.Annotations.cs | 6 +++--- Tapeti/Config/IControllerBindingContext.cs | 2 ++ Tapeti/Config/IPublishContext.cs | 4 +--- Tapeti/Config/ITapetiConfigBuilder.cs | 2 ++ Tapeti/Connection/TapetiSubscriber.cs | 6 ------ Tapeti/TapetiConfigControllers.cs | 1 - Tapeti/TapetiConnection.cs | 4 ++-- Test/MarcoEmitter.cs | 2 ++ 10 files changed, 16 insertions(+), 19 deletions(-) diff --git a/Tapeti.Annotations/ReSharper/JetBrains.Annotations.cs b/Tapeti.Annotations/ReSharper/JetBrains.Annotations.cs index 9ec2401..0876167 100644 --- a/Tapeti.Annotations/ReSharper/JetBrains.Annotations.cs +++ b/Tapeti.Annotations/ReSharper/JetBrains.Annotations.cs @@ -96,9 +96,9 @@ namespace JetBrains.Annotations TargetFlags = targetFlags; } - public ImplicitUseKindFlags UseKindFlags { get; private set; } + public ImplicitUseKindFlags UseKindFlags { get; } - public ImplicitUseTargetFlags TargetFlags { get; private set; } + public ImplicitUseTargetFlags TargetFlags { get; } } /// @@ -174,6 +174,6 @@ namespace JetBrains.Annotations Comment = comment; } - [CanBeNull] public string Comment { get; private set; } + [CanBeNull] public string Comment { get; } } } \ No newline at end of file diff --git a/Tapeti.Flow/Default/FlowStore.cs b/Tapeti.Flow/Default/FlowStore.cs index 097cc91..bee2419 100644 --- a/Tapeti.Flow/Default/FlowStore.cs +++ b/Tapeti.Flow/Default/FlowStore.cs @@ -88,7 +88,7 @@ namespace Tapeti.Flow.Default public FlowStateLock(FlowStore owner, Guid flowID, IDisposable flowLock) { this.owner = owner; - this.FlowID = flowID; + FlowID = flowID; this.flowLock = flowLock; owner.flowStates.TryGetValue(flowID, out flowState); diff --git a/Tapeti.Flow/ReSharper/JetBrains.Annotations.cs b/Tapeti.Flow/ReSharper/JetBrains.Annotations.cs index 9ec2401..0876167 100644 --- a/Tapeti.Flow/ReSharper/JetBrains.Annotations.cs +++ b/Tapeti.Flow/ReSharper/JetBrains.Annotations.cs @@ -96,9 +96,9 @@ namespace JetBrains.Annotations TargetFlags = targetFlags; } - public ImplicitUseKindFlags UseKindFlags { get; private set; } + public ImplicitUseKindFlags UseKindFlags { get; } - public ImplicitUseTargetFlags TargetFlags { get; private set; } + public ImplicitUseTargetFlags TargetFlags { get; } } /// @@ -174,6 +174,6 @@ namespace JetBrains.Annotations Comment = comment; } - [CanBeNull] public string Comment { get; private set; } + [CanBeNull] public string Comment { get; } } } \ No newline at end of file diff --git a/Tapeti/Config/IControllerBindingContext.cs b/Tapeti/Config/IControllerBindingContext.cs index a7a63db..1c21cd7 100644 --- a/Tapeti/Config/IControllerBindingContext.cs +++ b/Tapeti/Config/IControllerBindingContext.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System.Reflection; using System.Threading.Tasks; +// ReSharper disable UnusedMember.Global + namespace Tapeti.Config { /// diff --git a/Tapeti/Config/IPublishContext.cs b/Tapeti/Config/IPublishContext.cs index c66e765..30a51b6 100644 --- a/Tapeti/Config/IPublishContext.cs +++ b/Tapeti/Config/IPublishContext.cs @@ -1,6 +1,4 @@ -using RabbitMQ.Client; - -// ReSharper disable UnusedMember.Global +// ReSharper disable UnusedMember.Global namespace Tapeti.Config { diff --git a/Tapeti/Config/ITapetiConfigBuilder.cs b/Tapeti/Config/ITapetiConfigBuilder.cs index 51962ab..c063d79 100644 --- a/Tapeti/Config/ITapetiConfigBuilder.cs +++ b/Tapeti/Config/ITapetiConfigBuilder.cs @@ -1,5 +1,7 @@ using System; +// ReSharper disable UnusedMember.Global + namespace Tapeti.Config { /// diff --git a/Tapeti/Connection/TapetiSubscriber.cs b/Tapeti/Connection/TapetiSubscriber.cs index 4a77667..583c8ca 100644 --- a/Tapeti/Connection/TapetiSubscriber.cs +++ b/Tapeti/Connection/TapetiSubscriber.cs @@ -60,12 +60,6 @@ namespace Tapeti.Connection } - private async Task ApplyBinding(IBinding binding, IBindingTarget bindingTarget) - { - await binding.Apply(bindingTarget); - } - - private abstract class CustomBindingTarget : IBindingTarget { protected readonly Func ClientFactory; diff --git a/Tapeti/TapetiConfigControllers.cs b/Tapeti/TapetiConfigControllers.cs index 399a154..d0450dd 100644 --- a/Tapeti/TapetiConfigControllers.cs +++ b/Tapeti/TapetiConfigControllers.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Linq; using System.Reflection; using Tapeti.Annotations; diff --git a/Tapeti/TapetiConnection.cs b/Tapeti/TapetiConnection.cs index 844249f..8a24080 100644 --- a/Tapeti/TapetiConnection.cs +++ b/Tapeti/TapetiConnection.cs @@ -27,7 +27,7 @@ namespace Tapeti /// public TapetiConnectionParams Params { get; set; } - private readonly Lazy client; + private readonly Lazy client; private TapetiSubscriber subscriber; /// @@ -40,7 +40,7 @@ namespace Tapeti this.config = config; (config.DependencyResolver as IDependencyContainer)?.RegisterDefault(GetPublisher); - client = new Lazy(() => new TapetiClient(config, Params ?? new TapetiConnectionParams()) + client = new Lazy(() => new TapetiClient(config, Params ?? new TapetiConnectionParams()) { ConnectionEventListener = new ConnectionEventListener(this) }); diff --git a/Test/MarcoEmitter.cs b/Test/MarcoEmitter.cs index b40ae95..e584739 100644 --- a/Test/MarcoEmitter.cs +++ b/Test/MarcoEmitter.cs @@ -1,5 +1,7 @@ using System.Threading.Tasks; +// ReSharper disable UnusedMember.Global + namespace Test { public class MarcoEmitter