/// <summary>
/// Provide a decent string representation of the event property value
/// </summary>
/// <remarks>The built-in <c>ToString</c> wraps the string with quotes</remarks>
/// <param name="logEventPropertyValue">Event property value to provide a string representation</param>
public static string ToDecentString(this LogEventPropertyValue logEventPropertyValue)
{
Guard.NotNull(logEventPropertyValue, nameof(logEventPropertyValue));
var propertyValueAsString = logEventPropertyValue.ToString().Trim();
if (propertyValueAsString.StartsWith("\""))
{
propertyValueAsString = propertyValueAsString.Remove(0, 1);
}
if (propertyValueAsString.EndsWith("\""))
{
propertyValueAsString = propertyValueAsString.Remove(propertyValueAsString.Length - 1);
}
return(propertyValueAsString);
}