void HandleMessageSelectionWasMade(MessageSelectionWasMade messageSelectionWasMade) { var oneOrMoreSelectedMessagesHasSourceQueueHeader = messageSelectionWasMade.SelectedMessages.Any(m => m.Headers.ContainsKey(Headers.SourceQueue)); var oneOrMoreMessagesSelected = messageSelectionWasMade.SelectedMessages.Any(); var exactlyOneMessageIsSelected = messageSelectionWasMade.SelectedMessages.Count() == 1; CanMoveMessagesToSourceQueue = oneOrMoreSelectedMessagesHasSourceQueueHeader; CanMoveMessages = oneOrMoreMessagesSelected; CanCopyMessages = oneOrMoreMessagesSelected; CanDeleteMessages = oneOrMoreMessagesSelected; CanDownloadMessages = oneOrMoreMessagesSelected; CanUpdateMessage = exactlyOneMessageIsSelected; }
void HandleMessageSelectionWasMade(MessageSelectionWasMade messageSelectionWasMade) { CanMoveMessagesToSourceQueue = messageSelectionWasMade.SelectedMessages.Any(m => m.Headers.ContainsKey(Headers.SourceQueue)); CanDeleteMessages = messageSelectionWasMade.SelectedMessages.Any(); }