1
0
mirror of synced 2024-11-14 06:29:17 +00:00

[ci skip] Fixed the last of the ReSharper code issues

This commit is contained in:
Mark van Renswoude 2019-08-15 16:00:04 +02:00
parent c83ca889b7
commit 196aa63a4a
16 changed files with 30 additions and 24 deletions

View File

@ -30,6 +30,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
using System;
// ReSharper disable InheritdocConsiderUsage
#pragma warning disable 1591
// ReSharper disable UnusedMember.Global
@ -142,7 +143,7 @@ namespace JetBrains.Annotations
/// </summary>
InstantiatedWithFixedConstructorSignature = 4,
/// <summary>Indicates implicit instantiation of a type.</summary>
InstantiatedNoFixedConstructorSignature = 8,
InstantiatedNoFixedConstructorSignature = 8
}
/// <summary>

View File

@ -1,5 +1,4 @@
using System;
using System.Reflection;
using System.Reflection;
using Tapeti.Config;
namespace Tapeti.Flow.Default

View File

@ -4,6 +4,7 @@ using System.Threading.Tasks;
namespace Tapeti.Flow.Default
{
/// <inheritdoc />
/// <summary>
/// Default implementation for IFlowRepository. Does not persist any state, relying on the FlowStore's cache instead.
/// </summary>

View File

@ -27,7 +27,7 @@ namespace Tapeti.Flow.FlowHelpers
var nextLi = new LockItem(locks, key);
try
{
bool continueImmediately = false;
var continueImmediately = false;
lock (locks)
{
if (!locks.TryGetValue(key, out var li))

View File

@ -1,7 +1,6 @@
using System;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Tapeti.Config;
// ReSharper disable UnusedMember.Global

View File

@ -38,6 +38,7 @@ using System;
// ReSharper disable IntroduceOptionalParameters.Global
// ReSharper disable MemberCanBeProtected.Global
// ReSharper disable InconsistentNaming
// ReSharper disable InheritdocConsiderUsage
// ReSharper disable once CheckNamespace
namespace JetBrains.Annotations
@ -142,7 +143,7 @@ namespace JetBrains.Annotations
/// </summary>
InstantiatedWithFixedConstructorSignature = 4,
/// <summary>Indicates implicit instantiation of a type.</summary>
InstantiatedNoFixedConstructorSignature = 8,
InstantiatedNoFixedConstructorSignature = 8
}
/// <summary>

View File

@ -126,7 +126,7 @@ namespace Tapeti.Tests.Helpers
AssertConnectionString("HostName=rabbit.com;Username=\"myApplication\"", new TapetiConnectionParams
{
HostName = "rabbit.com",
Username = "myApplication",
Username = "myApplication"
});
}

View File

@ -1,5 +1,7 @@
using System.Threading.Tasks;
// ReSharper disable UnusedMember.Global
namespace Tapeti.Transient
{
/// <summary>

View File

@ -23,7 +23,7 @@ namespace Tapeti.Transient
/// <inheritdoc />
public async Task<TResponse> RequestResponse<TRequest, TResponse>(TRequest request)
{
return (TResponse)(await router.RequestResponse(publisher, request));
return (TResponse)await router.RequestResponse(publisher, request);
}
}
}

View File

@ -96,14 +96,13 @@ namespace Tapeti.Connection
public async Task<string> BindDynamic(Type messageClass, string queuePrefix = null)
{
var result = await DeclareDynamicQueue(messageClass, queuePrefix);
if (!result.IsNewMessageClass)
return result.QueueName;
if (result.IsNewMessageClass)
{
var routingKey = RoutingKeyStrategy.GetRoutingKey(messageClass);
var exchange = ExchangeStrategy.GetExchange(messageClass);
await ClientFactory().DynamicQueueBind(result.QueueName, new QueueBinding(exchange, routingKey));
}
return result.QueueName;
}

View File

@ -6,6 +6,7 @@ using System.Text.RegularExpressions;
namespace Tapeti.Default
{
/// <inheritdoc />
/// <summary>
/// IRoutingKeyStrategy implementation which transforms the class name into a dot-separated routing key based
/// on the casing. Accounts for acronyms. If the class name ends with 'Message' it is not included in the routing key.

View File

@ -150,7 +150,7 @@ namespace Tapeti
Task.Run(() =>
{
subscriber?.ApplyBindings().ContinueWith((t) =>
subscriber?.ApplyBindings().ContinueWith(t =>
{
reconnectedEvent.Invoke(this, e);
});

View File

@ -67,12 +67,12 @@ namespace Tapeti
Port = uri.Port;
var userInfo = uri.UserInfo.Split(':');
if (userInfo.Length > 0)
{
if (userInfo.Length <= 0)
return;
Username = userInfo[0];
if (userInfo.Length > 1)
Password = userInfo[1];
}
}
}
}

View File

@ -29,7 +29,7 @@ namespace Test
//never true
return flowProvider
.YieldWithRequestSync<PingConfirmationRequestMessage, PingConfirmationResponseMessage>
(new PingConfirmationRequestMessage() { StoredInState = "Ping:" },
(new PingConfirmationRequestMessage { StoredInState = "Ping:" },
HandlePingConfirmationResponse);
}

View File

@ -81,7 +81,7 @@ namespace Test
.AddRequestSync<PoloConfirmationRequestMessage, PoloConfirmationResponseMessage>(new PoloConfirmationRequestMessage
{
StoredInState = StateTestGuid,
EnumValue = TestEnum.Value1,
EnumValue = TestEnum.Value1
}, HandlePoloConfirmationResponse1)
@ -124,6 +124,7 @@ namespace Test
* This will automatically include the correlationId in the response and
* use the replyTo header of the request if provided.
*/
[DurableQueue("tapeti.test.durable")]
public async Task<PoloConfirmationResponseMessage> PoloConfirmation(PoloConfirmationRequestMessage message)
{
Console.WriteLine(">> PoloConfirmation (returning confirmation)");

View File

@ -26,6 +26,7 @@ namespace Test
.WithFlow()
.WithDataAnnotations()
.WithTransient(TimeSpan.FromSeconds(30))
.EnableDeclareDurableQueues()
.RegisterAllControllers()
//.DisablePublisherConfirms() -> you probably never want to do this if you're using Flow or want requeues when a publish fails
.Build();
@ -74,7 +75,8 @@ namespace Test
//var emitter = container.GetInstance<MarcoEmitter>();
//emitter.Run().Wait();
Console.WriteLine("Press any Enter to continue");
Console.ReadLine();
}
}
//catch (Exception e)