Skip to content

Commit f04178c

Browse files
committed
Use short-circuit AND operator in EventAggregator
The HandlerExistsFor() method in EventAggregator uses the logical AND operator & instead of the conditional logical AND operator &&.
1 parent 3db4048 commit f04178c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Caliburn.Micro.Core/EventAggregator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public virtual bool HandlerExistsFor(Type messageType)
1717
{
1818
lock (_handlers)
1919
{
20-
return _handlers.Any(handler => handler.Handles(messageType) & !handler.IsDead);
20+
return _handlers.Any(handler => handler.Handles(messageType) && !handler.IsDead);
2121
}
2222
}
2323

0 commit comments

Comments
 (0)