78 references to ObjectDisplayOptions
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider (43)
src\Compilers\CSharp\Portable\SymbolDisplay\ObjectDisplay.cs (34)
37
public static string? FormatPrimitive(object? obj,
ObjectDisplayOptions
options)
212
public static string FormatLiteral(string value,
ObjectDisplayOptions
options)
224
var useQuotes = options.IncludesOption(
ObjectDisplayOptions
.UseQuotes);
225
var escapeNonPrintable = options.IncludesOption(
ObjectDisplayOptions
.EscapeNonPrintableCharacters);
313
internal static string FormatLiteral(char c,
ObjectDisplayOptions
options)
320
if (options.IncludesOption(
ObjectDisplayOptions
.IncludeCodePoints))
322
builder.Append(options.IncludesOption(
ObjectDisplayOptions
.UseHexadecimalNumbers) ? "0x" + ((int)c).ToString("x4") : ((int)c).ToString());
326
var useQuotes = options.IncludesOption(
ObjectDisplayOptions
.UseQuotes);
327
var escapeNonPrintable = options.IncludesOption(
ObjectDisplayOptions
.EscapeNonPrintableCharacters);
357
internal static string FormatLiteral(sbyte value,
ObjectDisplayOptions
options, CultureInfo? cultureInfo = null)
359
if (options.IncludesOption(
ObjectDisplayOptions
.UseHexadecimalNumbers))
371
internal static string FormatLiteral(byte value,
ObjectDisplayOptions
options, CultureInfo? cultureInfo = null)
373
if (options.IncludesOption(
ObjectDisplayOptions
.UseHexadecimalNumbers))
383
internal static string FormatLiteral(short value,
ObjectDisplayOptions
options, CultureInfo? cultureInfo = null)
385
if (options.IncludesOption(
ObjectDisplayOptions
.UseHexadecimalNumbers))
397
internal static string FormatLiteral(ushort value,
ObjectDisplayOptions
options, CultureInfo? cultureInfo = null)
399
if (options.IncludesOption(
ObjectDisplayOptions
.UseHexadecimalNumbers))
409
internal static string FormatLiteral(int value,
ObjectDisplayOptions
options, CultureInfo? cultureInfo = null)
411
if (options.IncludesOption(
ObjectDisplayOptions
.UseHexadecimalNumbers))
421
internal static string FormatLiteral(uint value,
ObjectDisplayOptions
options, CultureInfo? cultureInfo = null)
426
if (options.IncludesOption(
ObjectDisplayOptions
.UseHexadecimalNumbers))
436
if (options.IncludesOption(
ObjectDisplayOptions
.IncludeTypeSuffix))
444
internal static string FormatLiteral(long value,
ObjectDisplayOptions
options, CultureInfo? cultureInfo = null)
449
if (options.IncludesOption(
ObjectDisplayOptions
.UseHexadecimalNumbers))
459
if (options.IncludesOption(
ObjectDisplayOptions
.IncludeTypeSuffix))
467
internal static string FormatLiteral(ulong value,
ObjectDisplayOptions
options, CultureInfo? cultureInfo = null)
472
if (options.IncludesOption(
ObjectDisplayOptions
.UseHexadecimalNumbers))
482
if (options.IncludesOption(
ObjectDisplayOptions
.IncludeTypeSuffix))
490
internal static string FormatLiteral(double value,
ObjectDisplayOptions
options, CultureInfo? cultureInfo = null)
494
return options.IncludesOption(
ObjectDisplayOptions
.IncludeTypeSuffix) ? result + "D" : result;
497
internal static string FormatLiteral(float value,
ObjectDisplayOptions
options, CultureInfo? cultureInfo = null)
501
return options.IncludesOption(
ObjectDisplayOptions
.IncludeTypeSuffix) ? result + "F" : result;
504
internal static string FormatLiteral(decimal value,
ObjectDisplayOptions
options, CultureInfo? cultureInfo = null)
508
return options.IncludesOption(
ObjectDisplayOptions
.IncludeTypeSuffix) ? result + "M" : result;
src\ExpressionEvaluator\CSharp\Source\ResultProvider\CSharpFormatter.Values.cs (9)
46
internal override string GetArrayDisplayString(DkmClrAppDomain appDomain, Type lmrType, ReadOnlyCollection<int> sizes, ReadOnlyCollection<int> lowerBounds,
ObjectDisplayOptions
options)
151
internal override string GetNamesForFlagsEnumValue(ArrayBuilder<EnumField> fields, object value, ulong underlyingValue,
ObjectDisplayOptions
options, Type typeToDisplayOpt)
179
internal override string GetNameForEnumValue(ArrayBuilder<EnumField> fields, object value, ulong underlyingValue,
ObjectDisplayOptions
options, Type typeToDisplayOpt)
214
internal override string FormatLiteral(char c,
ObjectDisplayOptions
options)
219
internal override string FormatLiteral(int value,
ObjectDisplayOptions
options)
221
return ObjectDisplay.FormatLiteral(value, options & ~(
ObjectDisplayOptions
.UseQuotes |
ObjectDisplayOptions
.EscapeNonPrintableCharacters));
224
internal override string FormatPrimitiveObject(object value,
ObjectDisplayOptions
options)
229
internal override string FormatString(string str,
ObjectDisplayOptions
options)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (35)
src\Compilers\Core\Portable\SymbolDisplay\ObjectDisplayExtensions.cs (3)
12
/// Determines if a flag is set on the <see cref="
ObjectDisplayOptions
"/> enum.
17
internal static bool IncludesOption(this
ObjectDisplayOptions
options,
ObjectDisplayOptions
flag)
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.cs (4)
43
var
options = useQuotes
44
?
ObjectDisplayOptions
.UseQuotes |
ObjectDisplayOptions
.EscapeNonPrintableCharacters
45
:
ObjectDisplayOptions
.None;
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.Values.cs (28)
31
private string GetValueString(DkmClrValue value, DkmInspectionContext inspectionContext,
ObjectDisplayOptions
options, GetValueFlags flags)
40
options |=
ObjectDisplayOptions
.UseHexadecimalNumbers;
68
FormatLiteral((char)value.HostObjectValue, options |
ObjectDisplayOptions
.IncludeCodePoints),
75
FormatPrimitive(value, options & ~(
ObjectDisplayOptions
.UseQuotes |
ObjectDisplayOptions
.EscapeNonPrintableCharacters), inspectionContext),
101
var tmp = FormatPrimitive(value,
ObjectDisplayOptions
.UseHexadecimalNumbers, inspectionContext); // Always in hex.
111
: GetValueString(nullableValue, inspectionContext,
ObjectDisplayOptions
.None, GetValueFlags.IncludeTypeName);
124
return FormatPrimitiveObject(intPtr,
ObjectDisplayOptions
.UseHexadecimalNumbers);
129
return FormatPrimitiveObject(intPtr,
ObjectDisplayOptions
.UseHexadecimalNumbers);
143
return FormatPrimitiveObject(uIntPtr,
ObjectDisplayOptions
.UseHexadecimalNumbers);
148
return FormatPrimitiveObject(uIntPtr,
ObjectDisplayOptions
.UseHexadecimalNumbers);
179
private string GetValueStringForCharacter(DkmClrValue value, DkmInspectionContext inspectionContext,
ObjectDisplayOptions
options)
184
options |=
ObjectDisplayOptions
.UseHexadecimalNumbers;
272
private string GetEnumDisplayString(Type lmrType, DkmClrValue value,
ObjectDisplayOptions
options, bool includeTypeName, DkmInspectionContext inspectionContext)
421
return this.GetValueString(value, inspectionContext,
ObjectDisplayOptions
.None, GetValueFlags.IncludeTypeName);
425
return this.GetValueString(value, inspectionContext,
ObjectDisplayOptions
.IncludeTypeSuffix, GetValueFlags.None);
434
return this.GetValueString(value, inspectionContext,
ObjectDisplayOptions
.UseQuotes |
ObjectDisplayOptions
.EscapeNonPrintableCharacters, GetValueFlags.None);
439
return this.GetValueStringForCharacter(value, inspectionContext,
ObjectDisplayOptions
.UseQuotes |
ObjectDisplayOptions
.EscapeNonPrintableCharacters);
445
private string FormatPrimitive(DkmClrValue value,
ObjectDisplayOptions
options, DkmInspectionContext inspectionContext)
479
internal abstract string GetArrayDisplayString(DkmClrAppDomain appDomain, Type lmrType, ReadOnlyCollection<int> sizes, ReadOnlyCollection<int> lowerBounds,
ObjectDisplayOptions
options);
485
internal abstract string GetNamesForFlagsEnumValue(ArrayBuilder<EnumField> fields, object value, ulong underlyingValue,
ObjectDisplayOptions
options, Type typeToDisplayOpt);
487
internal abstract string GetNameForEnumValue(ArrayBuilder<EnumField> fields, object value, ulong underlyingValue,
ObjectDisplayOptions
options, Type typeToDisplayOpt);
493
internal abstract string FormatLiteral(char c,
ObjectDisplayOptions
options);
495
internal abstract string FormatLiteral(int value,
ObjectDisplayOptions
options);
497
internal abstract string FormatPrimitiveObject(object value,
ObjectDisplayOptions
options);
499
internal abstract string FormatString(string str,
ObjectDisplayOptions
options);