public InputOptions DumpValuesForDebug(ILogger logger)
{
if (logger == null) throw new ArgumentNullException("logger");
var properties = GetType().GetProperties().OrderBy(o => o.Name);
const string stringFormat = "{0,-35}: {1}";
logger.Debug("****************** Input options as configured ******************");
foreach (var propertyInfo in properties)
{
var propertyValue = propertyInfo.GetValue(this, new object[0]);
var enumerablePropertyValue = propertyValue as IEnumerable<string>;
if (enumerablePropertyValue != null)
{
logger.Debug(stringFormat.FormatWith(propertyInfo.Name, "IEnumerable<string>"));
logger.Debug("{0,-35} {{".FormatWith(""));
foreach (var itemValue in enumerablePropertyValue)
{
logger.Debug("{0,-35} '{1}'".FormatWith("", itemValue));
}
logger.Debug("{0,-35} }}".FormatWith(""));
}
else
{
logger.Debug(stringFormat.FormatWith(propertyInfo.Name, propertyValue));
}
}
logger.Debug("*****************************************************************");
return this;
}