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