Example #1
0
            public string Format(DisplayActualOptions options)
            {
                var w = Text;

                if (options.ShowWhitespace())
                {
                    w = TextUtility.ShowWhitespace(w);
                }
                if (options.ShowType())
                {
                    var type = TextUtility.ConvertToSimpleTypeName(Type);
                    w += $" ({type})";
                }
                return(w);
            }
Example #2
0
            public string Format(DisplayActualOptions options)
            {
                var w = _text;

                if (_escape)
                {
                    w = string.Format("\"{0}\"", TextUtility.Escape(w));
                }

                if (options.ShowWhitespace())
                {
                    w = TextUtility.ShowWhitespace(w);
                }
                if (_text.Length == 0)
                {
                    w = "<empty>";
                }

                if (options.ShowType())
                {
                    return(w + " (string)");
                }
                return(w);
            }