[ci skip] Fixed the last of the ReSharper code issues
This commit is contained in:
parent
c83ca889b7
commit
196aa63a4a
@ -30,6 +30,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE. */
|
SOFTWARE. */
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
// ReSharper disable InheritdocConsiderUsage
|
||||||
|
|
||||||
#pragma warning disable 1591
|
#pragma warning disable 1591
|
||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
@ -142,7 +143,7 @@ namespace JetBrains.Annotations
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
InstantiatedWithFixedConstructorSignature = 4,
|
InstantiatedWithFixedConstructorSignature = 4,
|
||||||
/// <summary>Indicates implicit instantiation of a type.</summary>
|
/// <summary>Indicates implicit instantiation of a type.</summary>
|
||||||
InstantiatedNoFixedConstructorSignature = 8,
|
InstantiatedNoFixedConstructorSignature = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Reflection;
|
||||||
using System.Reflection;
|
|
||||||
using Tapeti.Config;
|
using Tapeti.Config;
|
||||||
|
|
||||||
namespace Tapeti.Flow.Default
|
namespace Tapeti.Flow.Default
|
||||||
|
@ -4,6 +4,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Tapeti.Flow.Default
|
namespace Tapeti.Flow.Default
|
||||||
{
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default implementation for IFlowRepository. Does not persist any state, relying on the FlowStore's cache instead.
|
/// Default implementation for IFlowRepository. Does not persist any state, relying on the FlowStore's cache instead.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -27,7 +27,7 @@ namespace Tapeti.Flow.FlowHelpers
|
|||||||
var nextLi = new LockItem(locks, key);
|
var nextLi = new LockItem(locks, key);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
bool continueImmediately = false;
|
var continueImmediately = false;
|
||||||
lock (locks)
|
lock (locks)
|
||||||
{
|
{
|
||||||
if (!locks.TryGetValue(key, out var li))
|
if (!locks.TryGetValue(key, out var li))
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Tapeti.Config;
|
|
||||||
|
|
||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ using System;
|
|||||||
// ReSharper disable IntroduceOptionalParameters.Global
|
// ReSharper disable IntroduceOptionalParameters.Global
|
||||||
// ReSharper disable MemberCanBeProtected.Global
|
// ReSharper disable MemberCanBeProtected.Global
|
||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
|
// ReSharper disable InheritdocConsiderUsage
|
||||||
|
|
||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace JetBrains.Annotations
|
namespace JetBrains.Annotations
|
||||||
@ -142,7 +143,7 @@ namespace JetBrains.Annotations
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
InstantiatedWithFixedConstructorSignature = 4,
|
InstantiatedWithFixedConstructorSignature = 4,
|
||||||
/// <summary>Indicates implicit instantiation of a type.</summary>
|
/// <summary>Indicates implicit instantiation of a type.</summary>
|
||||||
InstantiatedNoFixedConstructorSignature = 8,
|
InstantiatedNoFixedConstructorSignature = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -126,7 +126,7 @@ namespace Tapeti.Tests.Helpers
|
|||||||
AssertConnectionString("HostName=rabbit.com;Username=\"myApplication\"", new TapetiConnectionParams
|
AssertConnectionString("HostName=rabbit.com;Username=\"myApplication\"", new TapetiConnectionParams
|
||||||
{
|
{
|
||||||
HostName = "rabbit.com",
|
HostName = "rabbit.com",
|
||||||
Username = "myApplication",
|
Username = "myApplication"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
// ReSharper disable UnusedMember.Global
|
||||||
|
|
||||||
namespace Tapeti.Transient
|
namespace Tapeti.Transient
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -23,7 +23,7 @@ namespace Tapeti.Transient
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task<TResponse> RequestResponse<TRequest, TResponse>(TRequest request)
|
public async Task<TResponse> RequestResponse<TRequest, TResponse>(TRequest request)
|
||||||
{
|
{
|
||||||
return (TResponse)(await router.RequestResponse(publisher, request));
|
return (TResponse)await router.RequestResponse(publisher, request);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,14 +96,13 @@ namespace Tapeti.Connection
|
|||||||
public async Task<string> BindDynamic(Type messageClass, string queuePrefix = null)
|
public async Task<string> BindDynamic(Type messageClass, string queuePrefix = null)
|
||||||
{
|
{
|
||||||
var result = await DeclareDynamicQueue(messageClass, queuePrefix);
|
var result = await DeclareDynamicQueue(messageClass, queuePrefix);
|
||||||
|
if (!result.IsNewMessageClass)
|
||||||
|
return result.QueueName;
|
||||||
|
|
||||||
if (result.IsNewMessageClass)
|
|
||||||
{
|
|
||||||
var routingKey = RoutingKeyStrategy.GetRoutingKey(messageClass);
|
var routingKey = RoutingKeyStrategy.GetRoutingKey(messageClass);
|
||||||
var exchange = ExchangeStrategy.GetExchange(messageClass);
|
var exchange = ExchangeStrategy.GetExchange(messageClass);
|
||||||
|
|
||||||
await ClientFactory().DynamicQueueBind(result.QueueName, new QueueBinding(exchange, routingKey));
|
await ClientFactory().DynamicQueueBind(result.QueueName, new QueueBinding(exchange, routingKey));
|
||||||
}
|
|
||||||
|
|
||||||
return result.QueueName;
|
return result.QueueName;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ using System.Text.RegularExpressions;
|
|||||||
|
|
||||||
namespace Tapeti.Default
|
namespace Tapeti.Default
|
||||||
{
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IRoutingKeyStrategy implementation which transforms the class name into a dot-separated routing key based
|
/// 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.
|
/// on the casing. Accounts for acronyms. If the class name ends with 'Message' it is not included in the routing key.
|
||||||
|
@ -150,7 +150,7 @@ namespace Tapeti
|
|||||||
|
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
subscriber?.ApplyBindings().ContinueWith((t) =>
|
subscriber?.ApplyBindings().ContinueWith(t =>
|
||||||
{
|
{
|
||||||
reconnectedEvent.Invoke(this, e);
|
reconnectedEvent.Invoke(this, e);
|
||||||
});
|
});
|
||||||
|
@ -67,12 +67,12 @@ namespace Tapeti
|
|||||||
Port = uri.Port;
|
Port = uri.Port;
|
||||||
|
|
||||||
var userInfo = uri.UserInfo.Split(':');
|
var userInfo = uri.UserInfo.Split(':');
|
||||||
if (userInfo.Length > 0)
|
if (userInfo.Length <= 0)
|
||||||
{
|
return;
|
||||||
|
|
||||||
Username = userInfo[0];
|
Username = userInfo[0];
|
||||||
if (userInfo.Length > 1)
|
if (userInfo.Length > 1)
|
||||||
Password = userInfo[1];
|
Password = userInfo[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -29,7 +29,7 @@ namespace Test
|
|||||||
//never true
|
//never true
|
||||||
return flowProvider
|
return flowProvider
|
||||||
.YieldWithRequestSync<PingConfirmationRequestMessage, PingConfirmationResponseMessage>
|
.YieldWithRequestSync<PingConfirmationRequestMessage, PingConfirmationResponseMessage>
|
||||||
(new PingConfirmationRequestMessage() { StoredInState = "Ping:" },
|
(new PingConfirmationRequestMessage { StoredInState = "Ping:" },
|
||||||
HandlePingConfirmationResponse);
|
HandlePingConfirmationResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ namespace Test
|
|||||||
.AddRequestSync<PoloConfirmationRequestMessage, PoloConfirmationResponseMessage>(new PoloConfirmationRequestMessage
|
.AddRequestSync<PoloConfirmationRequestMessage, PoloConfirmationResponseMessage>(new PoloConfirmationRequestMessage
|
||||||
{
|
{
|
||||||
StoredInState = StateTestGuid,
|
StoredInState = StateTestGuid,
|
||||||
EnumValue = TestEnum.Value1,
|
EnumValue = TestEnum.Value1
|
||||||
|
|
||||||
}, HandlePoloConfirmationResponse1)
|
}, HandlePoloConfirmationResponse1)
|
||||||
|
|
||||||
@ -124,6 +124,7 @@ namespace Test
|
|||||||
* This will automatically include the correlationId in the response and
|
* This will automatically include the correlationId in the response and
|
||||||
* use the replyTo header of the request if provided.
|
* use the replyTo header of the request if provided.
|
||||||
*/
|
*/
|
||||||
|
[DurableQueue("tapeti.test.durable")]
|
||||||
public async Task<PoloConfirmationResponseMessage> PoloConfirmation(PoloConfirmationRequestMessage message)
|
public async Task<PoloConfirmationResponseMessage> PoloConfirmation(PoloConfirmationRequestMessage message)
|
||||||
{
|
{
|
||||||
Console.WriteLine(">> PoloConfirmation (returning confirmation)");
|
Console.WriteLine(">> PoloConfirmation (returning confirmation)");
|
||||||
|
@ -26,6 +26,7 @@ namespace Test
|
|||||||
.WithFlow()
|
.WithFlow()
|
||||||
.WithDataAnnotations()
|
.WithDataAnnotations()
|
||||||
.WithTransient(TimeSpan.FromSeconds(30))
|
.WithTransient(TimeSpan.FromSeconds(30))
|
||||||
|
.EnableDeclareDurableQueues()
|
||||||
.RegisterAllControllers()
|
.RegisterAllControllers()
|
||||||
//.DisablePublisherConfirms() -> you probably never want to do this if you're using Flow or want requeues when a publish fails
|
//.DisablePublisherConfirms() -> you probably never want to do this if you're using Flow or want requeues when a publish fails
|
||||||
.Build();
|
.Build();
|
||||||
@ -74,7 +75,8 @@ namespace Test
|
|||||||
//var emitter = container.GetInstance<MarcoEmitter>();
|
//var emitter = container.GetInstance<MarcoEmitter>();
|
||||||
//emitter.Run().Wait();
|
//emitter.Run().Wait();
|
||||||
|
|
||||||
|
Console.WriteLine("Press any Enter to continue");
|
||||||
|
Console.ReadLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//catch (Exception e)
|
//catch (Exception e)
|
||||||
|
Loading…
Reference in New Issue
Block a user