diff --git a/src/MiniProfiler.Shared/SqlFormatters/InlineFormatter.cs b/src/MiniProfiler.Shared/SqlFormatters/InlineFormatter.cs
index 6009f742..4d3b1cae 100644
--- a/src/MiniProfiler.Shared/SqlFormatters/InlineFormatter.cs
+++ b/src/MiniProfiler.Shared/SqlFormatters/InlineFormatter.cs
@@ -11,25 +11,20 @@ public class InlineFormatter : ISqlFormatter
{
private static readonly Regex CommandSpacing = new Regex(@",([^\s])", RegexOptions.Compiled);
private static bool includeTypeInfo;
- private static bool increaseReadability;
///
- /// Creates a new , optionally including the parameter type info
- /// in comments beside the replaced value
+ /// Modifies the output query to increase readibility by adding spaces around crowded commas.
///
- /// Whether to include a comment after the value, indicating the type, e.g. /* @myParam DbType.Int32 */
- public InlineFormatter(bool includeTypeInfo = false) : this(true, includeTypeInfo) { }
+ public bool IncreaseReadability { get; set; } = true;
///
/// Creates a new , optionally including the parameter type info
/// in comments beside the replaced value
///
- /// Modifies the output query to increase readibility by adding spaces around crowded commas.
/// Whether to include a comment after the value, indicating the type, e.g. /* @myParam DbType.Int32 */
- public InlineFormatter(bool increaseReadability, bool includeTypeInfo = false)
+ public InlineFormatter(bool includeTypeInfo = false)
{
InlineFormatter.includeTypeInfo = includeTypeInfo;
- InlineFormatter.increaseReadability = increaseReadability;
}
///
@@ -45,7 +40,7 @@ public string FormatSql(string commandText, List parameters)
return commandText;
}
- if (increaseReadability)
+ if (IncreaseReadability)
{
commandText = CommandSpacing.Replace(commandText, ", $1");
}