private static MessageBrokerType ConvertToMessageBrokerType(string messageBrokerTypeAsString)
        {
            switch (ValidatorString.DetermineNullEmptyOrWhiteSpaces(messageBrokerTypeAsString))
            {
            case StringState.Null:
            case StringState.Empty:
            case StringState.WhiteSpaces:
                return(MessageBrokerType.ServiceBus);

            default:
                return((MessageBrokerType)Enum.Parse(typeof(MessageBrokerType), messageBrokerTypeAsString));
            }
        }
        private static void ValidateMessageBrokerType(StringBuilder errorMessages, string messageBrokerTypeAsString)
        {
            switch (ValidatorString.DetermineNullEmptyOrWhiteSpaces(messageBrokerTypeAsString))
            {
            case StringState.Null:
            case StringState.Empty:
            case StringState.WhiteSpaces:
                break;

            case StringState.Valid:
                if (!MessageBrokerTypeNames.Contains(messageBrokerTypeAsString))
                {
                    errorMessages.Append($"Invalid MessageBrokerType Setting \"{ messageBrokerTypeAsString }\" was provided. The MessageBrokerType Setting can have only one the following values: { MessageBrokerTypeNames }.");
                }
                break;
            }
        }
 private static void ValidateConnectionString(StringBuilder errorMessages, string messageBrokerConnectionString)
 {
     errorMessages.AppendLineIfNotNull(ValidatorString.Validate("MessageBrokerSettings.MessageBrokerConnectionString", messageBrokerConnectionString));
 }