Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Mocha/src/Mocha/Endpoints/EndpointRouter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ private void AddOrUpdateInternal(DispatchEndpoint endpoint, Uri? resolvedAddress
// Build new set of addresses
var newAddresses = ImmutableHashSet<Uri>.Empty;

// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
if (endpointAddress is not null)
{
Comment thread
glen-84 marked this conversation as resolved.
newAddresses = newAddresses.Add(endpointAddress);
Expand Down Expand Up @@ -222,6 +223,7 @@ private void AddOrUpdateInternal(DispatchEndpoint endpoint, Uri? resolvedAddress
// New endpoint
var addresses = ImmutableHashSet<Uri>.Empty;

// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
if (endpointAddress is not null)
{
Comment thread
glen-84 marked this conversation as resolved.
addresses = addresses.Add(endpointAddress);
Expand Down
1 change: 1 addition & 0 deletions src/Mocha/src/Mocha/MessageTypes/OutboundRoute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public OutboundRouteDescription Describe()
Kind,
MessageType.Identity,
Destination?.ToString(),
// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
Endpoint is not null
? new EndpointReferenceDescription(Endpoint.Name, Endpoint.Address?.ToString(), Endpoint.Transport.Name)
Comment thread
glen-84 marked this conversation as resolved.
: null);
Expand Down
3 changes: 3 additions & 0 deletions src/Mocha/src/Mocha/Transport/MessagingTransport.Lifecyle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ internal void Initialize(IMessagingSetupContext context)
// in case we have found a matching route that has no endpoint and no destination,
// we need to connect it to the endpoint
if (route is not null
// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
&& route.Endpoint is null
&& route.Destination is not null)
Comment thread
glen-84 marked this conversation as resolved.
{
Expand Down Expand Up @@ -202,6 +203,7 @@ internal void DiscoverEndpoints(IMessagingSetupContext context)
// TODO i am not sure if this is correct.
foreach (var route in router.OutboundRoutes)
{
// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
if (route.Endpoint is null)
{
Comment thread
glen-84 marked this conversation as resolved.
ConnectRoute(context, route);
Expand Down Expand Up @@ -246,6 +248,7 @@ private void CreateMatchingOutboundRoute(IMessagingSetupContext context, Inbound
outboundRoute.Initialize(context, outboundRouteConfiguration);
}

// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
if (outboundRoute.Endpoint is null)
{
Comment thread
glen-84 marked this conversation as resolved.
var outboundEndpoint = ConnectRoute(context, outboundRoute);
Expand Down
2 changes: 2 additions & 0 deletions src/Mocha/src/Mocha/Transport/MessagingTransport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public virtual TransportDescription Describe()

foreach (var endpoint in ReceiveEndpoints)
{
// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
if (endpoint.Source is not null)
{
Comment thread
glen-84 marked this conversation as resolved.
outboundResources.Add(endpoint.Source);
Expand All @@ -109,6 +110,7 @@ public virtual TransportDescription Describe()

foreach (var endpoint in DispatchEndpoints)
{
// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
if (endpoint.Destination is not null)
{
Comment thread
glen-84 marked this conversation as resolved.
inboundResources.Add(endpoint.Destination);
Expand Down
Loading