public void SetObjectQuoteStyle(ObjectQuoteStyle style)
        {
            switch (style)
            {
            case ObjectQuoteStyle.DoubleQuote:
                SetObjectQuoteStyle("\"", "\"");
                break;

            case ObjectQuoteStyle.BackTick:
                SetObjectQuoteStyle("`", "`");
                break;

            case ObjectQuoteStyle.Brackets:
                SetObjectQuoteStyle("[", "]");
                break;

            default:
                throw new ArgumentException($"{style} is not a valid value for a ObjectQuoteStyle", "style");
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Allows you to change the default behavior of the object quoting syntax. If not set, the default style is
 /// <see cref="ObjectQuoteStyle.Brackets"/>.
 /// </summary>
 /// <param name="style">THe <see cref="ObjectQuoteStyle"/> to use to define the object quote style.</param>
 public static void SetObjectQuoteStyle(ObjectQuoteStyle style) => GlobalSettings.Instance.SetObjectQuoteStyle(style);