private static String GetEntityPath <TMessage>(MessagingEntityType entityType) where TMessage : class { switch (entityType.RejectIf().IsEqualToValue(MessagingEntityType.Unspecified, nameof(entityType)).TargetArgument) { case MessagingEntityType.Queue: return(AzureServiceBusClientFactory.GetQueuePath <TMessage>()); case MessagingEntityType.Topic: return(AzureServiceBusClientFactory.GetTopicPath <TMessage>()); default: throw new InvalidOperationException($"The specified entity type, {entityType}, is not supported."); } }