214 references to SymbolDisplay
ConfigurationSchemaGenerator (2)
RuntimeSource\SourceGenerators\CSharpSyntaxUtilities.cs (2)
28return SymbolDisplay.FormatLiteral(@string, quote: true); 30return SymbolDisplay.FormatLiteral(@char, quote: true);
Microsoft.AspNetCore.App.Analyzers (5)
src\Shared\RoslynUtils\SymbolExtensions.cs (5)
187string s => SymbolDisplay.FormatLiteral(s, true), 188char c => SymbolDisplay.FormatLiteral(c, true), 194float f => $"{SymbolDisplay.FormatPrimitive(f, false, false)}F", 198decimal d => $"{SymbolDisplay.FormatPrimitive(d, false, false)}M", 199_ => SymbolDisplay.FormatPrimitive(defaultValue, false, false),
Microsoft.AspNetCore.Http.RequestDelegateGenerator (64)
RequestDelegateGenerator.cs (1)
147codeWriter.WriteLine($"{SymbolDisplay.FormatLiteral("{*path:nonfile}", true)},");
RequestDelegateGeneratorSources.cs (23)
228LoggerMessage.Define(LogLevel.Debug, new EventId({{RequestDelegateCreationLogging.RequestBodyIOExceptionEventId}}, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.RequestBodyIOExceptionEventName, true)}}), {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.RequestBodyIOExceptionMessage, true)}}); 234var message = string.Format(CultureInfo.InvariantCulture, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.InvalidJsonRequestBodyExceptionMessage, true)}}, parameterTypeName, parameterName); 245LoggerMessage.Define<string, string>(LogLevel.Debug, new EventId({{RequestDelegateCreationLogging.InvalidJsonRequestBodyEventId}}, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.InvalidJsonRequestBodyEventName, true)}}), {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.InvalidJsonRequestBodyLogMessage, true)}}); 251var message = string.Format(CultureInfo.InvariantCulture, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.ParameterBindingFailedExceptionMessage, true)}}, parameterTypeName, parameterName, sourceValue); 262LoggerMessage.Define<string, string, string>(LogLevel.Debug, new EventId({{RequestDelegateCreationLogging.ParameterBindingFailedEventId}}, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.ParameterBindingFailedEventName, true)}}), {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.ParameterBindingFailedLogMessage, true)}}); 268var message = string.Format(CultureInfo.InvariantCulture, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.RequiredParameterNotProvidedExceptionMessage, true)}}, parameterTypeName, parameterName, source); 279LoggerMessage.Define<string, string, string>(LogLevel.Debug, new EventId({{RequestDelegateCreationLogging.RequiredParameterNotProvidedEventId}}, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.RequiredParameterNotProvidedEventName, true)}}), {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.RequiredParameterNotProvidedLogMessage, true)}}); 285var message = string.Format(CultureInfo.InvariantCulture, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.ImplicitBodyNotProvidedExceptionMessage, true)}}, parameterName); 296LoggerMessage.Define<string>(LogLevel.Debug, new EventId({{RequestDelegateCreationLogging.ImplicitBodyNotProvidedEventId}}, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.ImplicitBodyNotProvidedEventName, true)}}), {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.ImplicitBodyNotProvidedLogMessage, true)}}); 302var message = string.Format(CultureInfo.InvariantCulture, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.UnexpectedJsonContentTypeExceptionMessage, true)}}, contentType); 313LoggerMessage.Define<string>(LogLevel.Debug, new EventId({{RequestDelegateCreationLogging.UnexpectedJsonContentTypeEventId}}, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.UnexpectedJsonContentTypeEventName, true)}}), {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.UnexpectedJsonContentTypeLogMessage, true)}}); 319var message = string.Format(CultureInfo.InvariantCulture, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.UnexpectedFormContentTypeExceptionMessage, true)}}, contentType); 330LoggerMessage.Define<string>(LogLevel.Debug, new EventId({{RequestDelegateCreationLogging.UnexpectedFormContentTypeEventId}}, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.UnexpectedFormContentTypeLogEventName, true)}}), {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.UnexpectedFormContentTypeLogMessage, true)}}); 336var message = string.Format(CultureInfo.InvariantCulture, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.InvalidFormRequestBodyExceptionMessage, true)}}, parameterTypeName, parameterName); 347LoggerMessage.Define<string, string>(LogLevel.Debug, new EventId({{RequestDelegateCreationLogging.InvalidFormRequestBodyEventId}}, {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.InvalidFormRequestBodyEventName, true)}}), {{SymbolDisplay.FormatLiteral(RequestDelegateCreationLogging.InvalidFormRequestBodyLogMessage, true)}});
src\Shared\RoslynUtils\SymbolExtensions.cs (5)
187string s => SymbolDisplay.FormatLiteral(s, true), 188char c => SymbolDisplay.FormatLiteral(c, true), 194float f => $"{SymbolDisplay.FormatPrimitive(f, false, false)}F", 198decimal d => $"{SymbolDisplay.FormatPrimitive(d, false, false)}M", 199_ => SymbolDisplay.FormatPrimitive(defaultValue, false, false),
StaticRouteHandlerModel\Emitters\EndpointEmitter.cs (2)
121codeWriter.WriteLine($"ResolveJsonBodyOrService<{parameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)}>(logOrThrowExceptionHelper, {SymbolDisplay.FormatLiteral(shortParameterTypeName, true)}, {SymbolDisplay.FormatLiteral(parameter.SymbolName, true)}, jsonSerializerOptions, serviceProviderIsService);");
StaticRouteHandlerModel\Emitters\EndpointParameterEmitter.cs (26)
47codeWriter.WriteLine($@"logOrThrowExceptionHelper.RequiredParameterNotProvided({SymbolDisplay.FormatLiteral(endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat), true)}, {SymbolDisplay.FormatLiteral(endpointParameter.SymbolName, true)}, {SymbolDisplay.FormatLiteral(endpointParameter.ToMessageString(), true)});"); 65var assigningCode = $"await GeneratedRouteBuilderExtensionsCore.TryResolveFormAsync(httpContext, logOrThrowExceptionHelper, {SymbolDisplay.FormatLiteral(shortParameterTypeName, true)}, {SymbolDisplay.FormatLiteral(endpointParameter.SymbolName, true)})"; 83codeWriter.WriteLine($@"logOrThrowExceptionHelper.RequiredParameterNotProvided({SymbolDisplay.FormatLiteral(endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat), true)}, {SymbolDisplay.FormatLiteral(endpointParameter.SymbolName, true)}, {SymbolDisplay.FormatLiteral(endpointParameter.ToMessageString(), true)});"); 180writer.WriteLine($@"logOrThrowExceptionHelper.RequiredParameterNotProvided({SymbolDisplay.FormatLiteral(parameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat), true)}, {SymbolDisplay.FormatLiteral(parameter.SymbolName, true)}, {SymbolDisplay.FormatLiteral(parameter.ToMessageString(), true)});"); 184writer.WriteLine($@"logOrThrowExceptionHelper.ParameterBindingFailed({SymbolDisplay.FormatLiteral(parameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat), true)}, {SymbolDisplay.FormatLiteral(parameter.SymbolName, true)}, {inputArgument});"); 209codeWriter.WriteLine($@"logOrThrowExceptionHelper.RequiredParameterNotProvided({SymbolDisplay.FormatLiteral(endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat), true)}, {SymbolDisplay.FormatLiteral(endpointParameter.SymbolName, true)}, {SymbolDisplay.FormatLiteral(endpointParameter.ToMessageString(), true)});"); 240codeWriter.WriteLine($@"logOrThrowExceptionHelper.RequiredParameterNotProvided({SymbolDisplay.FormatLiteral(endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat), true)}, {SymbolDisplay.FormatLiteral(endpointParameter.SymbolName, true)}, {SymbolDisplay.FormatLiteral(endpointParameter.ToMessageString(), true)});"); 256var assigningCode = $"await GeneratedRouteBuilderExtensionsCore.TryResolveBodyAsync<{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)}>(httpContext, logOrThrowExceptionHelper, {(endpointParameter.IsOptional ? "true" : "false")}, {SymbolDisplay.FormatLiteral(shortParameterTypeName, true)}, {SymbolDisplay.FormatLiteral(endpointParameter.SymbolName, true)}, {endpointParameter.SymbolName}_JsonTypeInfo)"; 317var assigningCode = $"await GeneratedRouteBuilderExtensionsCore.TryResolveBodyAsync<{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)}>(httpContext, logOrThrowExceptionHelper, {(endpointParameter.IsOptional ? "true" : "false")}, {SymbolDisplay.FormatLiteral(shortParameterTypeName, true)}, {SymbolDisplay.FormatLiteral(endpointParameter.SymbolName, true)}, {endpointParameter.SymbolName}_JsonTypeInfo)"; 376codeWriter.WriteLine($@"logOrThrowExceptionHelper.RequiredParameterNotProvided({SymbolDisplay.FormatLiteral(endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat), true)}, {SymbolDisplay.FormatLiteral(endpointParameter.SymbolName, true)}, {SymbolDisplay.FormatLiteral(endpointParameter.ToMessageString(), true)});");
StaticRouteHandlerModel\EndpointParameter.cs (6)
45var propertyInfo = $"typeof({property.ContainingType.ToDisplayString()})!.GetProperty({SymbolDisplay.FormatLiteral(property.Name, true)})!"; 103AssigningCode = $"httpContext.Request.Form.Files[{SymbolDisplay.FormatLiteral(LookupName, true)}]"; 121? $"(string?)httpContext.Request.Form[{SymbolDisplay.FormatLiteral(LookupName, true)}]" 122: $"httpContext.Request.Form[{SymbolDisplay.FormatLiteral(LookupName, true)}].ToArray()"; 159KeyedServiceKey = SymbolDisplay.FormatPrimitive(constructorArgument.Value!, true, true); 208AssigningCode = $"httpContext.Request.Form.Files[{SymbolDisplay.FormatLiteral(LookupName, true)}]";
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (1)
393var parameterName = SymbolDisplay.FormatLiteral(parameter.SymbolName, true);
Microsoft.CodeAnalysis.CSharp (26)
Errors\MessageProvider.cs (1)
106return SymbolDisplay.ToDisplayString(symbol, SymbolDisplayFormat.CSharpShortErrorMessageFormat);
SymbolDisplay\SymbolDisplayVisitor_Constants.cs (1)
45var valueString = SymbolDisplay.FormatPrimitive(value, quoteStrings: true, useHexadecimalNumbers: false);
Symbols\PublicModel\PreprocessingSymbol.cs (5)
80return SymbolDisplay.ToDisplayString(this, format); 85return SymbolDisplay.ToDisplayParts(this, format); 90return SymbolDisplay.ToMinimalDisplayString(this, Symbol.GetCSharpSemanticModel(semanticModel), position, format); 95return SymbolDisplay.ToMinimalDisplayParts(this, Symbol.GetCSharpSemanticModel(semanticModel), position, format); 136return SymbolDisplay.ToDisplayString(this);
Symbols\PublicModel\Symbol.cs (5)
166return SymbolDisplay.ToDisplayString(this, format); 171return SymbolDisplay.ToDisplayParts(this, format); 176return SymbolDisplay.ToMinimalDisplayString(this, GetCSharpSemanticModel(semanticModel), position, format); 181return SymbolDisplay.ToMinimalDisplayParts(this, GetCSharpSemanticModel(semanticModel), position, format); 254return SymbolDisplay.ToDisplayString(this);
Symbols\PublicModel\TypeSymbol.cs (4)
149return SymbolDisplay.ToDisplayString(this, topLevelNullability, format); 154return SymbolDisplay.ToDisplayParts(this, topLevelNullability, format); 159return SymbolDisplay.ToMinimalDisplayString(this, topLevelNullability, semanticModel, position, format); 164return SymbolDisplay.ToMinimalDisplayParts(this, topLevelNullability, semanticModel, position, format);
Symbols\Symbol.cs (4)
1458return SymbolDisplay.ToDisplayString(ISymbol, format); 1463return SymbolDisplay.ToDisplayParts(ISymbol, format); 1471return SymbolDisplay.ToMinimalDisplayString(ISymbol, semanticModel, position, format); 1479return SymbolDisplay.ToMinimalDisplayParts(ISymbol, semanticModel, position, format);
Symbols\TypedConstantExtensions.cs (1)
43return SymbolDisplay.FormatPrimitive(constant.ValueInternal, quoteStrings: true, useHexadecimalNumbers: false);
Symbols\TypeSymbol.cs (4)
665return SymbolDisplay.ToDisplayString((ITypeSymbol)ISymbol, topLevelNullability, format); 670return SymbolDisplay.ToDisplayParts((ITypeSymbol)ISymbol, topLevelNullability, format); 679return SymbolDisplay.ToMinimalDisplayString((ITypeSymbol)ISymbol, topLevelNullability, semanticModel, position, format); 688return SymbolDisplay.ToMinimalDisplayParts((ITypeSymbol)ISymbol, topLevelNullability, semanticModel, position, format);
Syntax\SyntaxFactory.cs (1)
570return Literal(SymbolDisplay.FormatLiteral(value, quote: true), value);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
36=> SymbolDisplay.ToDisplayString(disposeImplMethod, format);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
108var valueString = SymbolDisplay.FormatLiteral(val, quote: true); 115var literal = SymbolDisplay.FormatLiteral(val, quote: true);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTupleTest.cs (1)
27463Assert.Equal(expectedCSharp, CSharp.SymbolDisplay.ToDisplayString(type, SymbolDisplayFormat.TestFormat));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\RecordTests.cs (1)
26091SymbolDisplay.ToDisplayString(symbol, SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
Microsoft.CodeAnalysis.CSharp.Features (4)
GenerateConstructorFromMembers\CSharpGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
48=> SymbolDisplay.ToDisplayString(parameter, format);
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (2)
117var displayParts = CodeAnalysis.CSharp.SymbolDisplay.ToMinimalDisplayParts(symbol, semanticModel, position, format); 167=> symbol == null ? null : CodeAnalysis.CSharp.SymbolDisplay.ToDisplayString(symbol, SymbolDisplayFormat.MinimallyQualifiedFormat);
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
36=> SymbolDisplay.ToDisplayString(disposeImplMethod, format);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\UnsafeTests.cs (1)
5245text = SymbolDisplay.FormatLiteral(text, quote: false);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (91)
SymbolDisplay\SymbolDisplayTests.cs (91)
2185var parts = SymbolDisplay.ToDisplayParts(prop, format); 2258var parts = SymbolDisplay.ToDisplayParts(prop, format); 2286var parts = SymbolDisplay.ToDisplayParts(goo, format); 4848var parts = Microsoft.CodeAnalysis.CSharp.SymbolDisplay.ToDisplayParts(goo, format); 5057Assert.Equal("Outer.Inner<T>", CSharp.SymbolDisplay.ToDisplayString(type, SymbolDisplayFormat.TestFormat)); 5058Assert.Equal("void Outer.M<U>()", CSharp.SymbolDisplay.ToDisplayString(method, SymbolDisplayFormat.TestFormat)); 5059Assert.Equal("System.String Outer.P { set; }", CSharp.SymbolDisplay.ToDisplayString(property, SymbolDisplayFormat.TestFormat)); 5060Assert.Equal("System.Int32 Outer.F", CSharp.SymbolDisplay.ToDisplayString(field, SymbolDisplayFormat.TestFormat)); 5061Assert.Equal("event Outer.EEventHandler Outer.E", CSharp.SymbolDisplay.ToDisplayString(@event, SymbolDisplayFormat.TestFormat)); 5062Assert.Equal("Outer.D", CSharp.SymbolDisplay.ToDisplayString(@delegate, SymbolDisplayFormat.TestFormat)); 5063Assert.Equal("Missing Outer.Error()", CSharp.SymbolDisplay.ToDisplayString(error, SymbolDisplayFormat.TestFormat)); 5070Assert.Equal("1", SymbolDisplay.FormatPrimitive(1, quoteStrings: false, useHexadecimalNumbers: false)); 5071Assert.Equal("1", SymbolDisplay.FormatPrimitive((uint)1, quoteStrings: false, useHexadecimalNumbers: false)); 5072Assert.Equal("1", SymbolDisplay.FormatPrimitive((byte)1, quoteStrings: false, useHexadecimalNumbers: false)); 5073Assert.Equal("1", SymbolDisplay.FormatPrimitive((sbyte)1, quoteStrings: false, useHexadecimalNumbers: false)); 5074Assert.Equal("1", SymbolDisplay.FormatPrimitive((short)1, quoteStrings: false, useHexadecimalNumbers: false)); 5075Assert.Equal("1", SymbolDisplay.FormatPrimitive((ushort)1, quoteStrings: false, useHexadecimalNumbers: false)); 5076Assert.Equal("1", SymbolDisplay.FormatPrimitive((long)1, quoteStrings: false, useHexadecimalNumbers: false)); 5077Assert.Equal("1", SymbolDisplay.FormatPrimitive((ulong)1, quoteStrings: false, useHexadecimalNumbers: false)); 5078Assert.Equal("x", SymbolDisplay.FormatPrimitive('x', quoteStrings: false, useHexadecimalNumbers: false)); 5079Assert.Equal("true", SymbolDisplay.FormatPrimitive(true, quoteStrings: false, useHexadecimalNumbers: false)); 5080Assert.Equal("1.5", SymbolDisplay.FormatPrimitive(1.5, quoteStrings: false, useHexadecimalNumbers: false)); 5081Assert.Equal("1.5", SymbolDisplay.FormatPrimitive((float)1.5, quoteStrings: false, useHexadecimalNumbers: false)); 5082Assert.Equal("1.5", SymbolDisplay.FormatPrimitive((decimal)1.5, quoteStrings: false, useHexadecimalNumbers: false)); 5083Assert.Equal("null", SymbolDisplay.FormatPrimitive(null, quoteStrings: false, useHexadecimalNumbers: false)); 5084Assert.Equal("abc", SymbolDisplay.FormatPrimitive("abc", quoteStrings: false, useHexadecimalNumbers: false)); 5085Assert.Null(SymbolDisplay.FormatPrimitive(SymbolDisplayFormat.TestFormat, quoteStrings: false, useHexadecimalNumbers: false)); 5586SymbolDisplay.ToDisplayParts(symbol, format), 5591SymbolDisplay.ToDisplayParts(symbol, SymbolDisplayFormat.MinimallyQualifiedFormat), 5597SymbolDisplay.ToMinimalDisplayParts(symbol, model, text.IndexOf("offset 1"), format), 5600SymbolDisplay.ToMinimalDisplayParts(symbol, model, text.IndexOf("offset 2"), format), 5629SymbolDisplay.ToDisplayParts(model.GetSymbolInfo(actualThis).Symbol, SymbolDisplayFormat.MinimallyQualifiedFormat), 5639SymbolDisplay.ToDisplayParts(model.GetSymbolInfo(escapedThis).Symbol, SymbolDisplayFormat.MinimallyQualifiedFormat), 5695SymbolDisplay.ToDisplayParts(method, formatWithoutRef), 5708SymbolDisplay.ToDisplayParts(property, formatWithoutRef), 5723SymbolDisplay.ToDisplayParts(indexer, formatWithoutRef), 5741SymbolDisplay.ToDisplayParts(@delegate, formatWithoutRef), 5751SymbolDisplay.ToDisplayParts(method, formatWithRef), 5766SymbolDisplay.ToDisplayParts(property, formatWithRef), 5783SymbolDisplay.ToDisplayParts(indexer, formatWithRef), 5803SymbolDisplay.ToDisplayParts(@delegate, formatWithRef), 5815SymbolDisplay.ToDisplayParts(method, formatWithoutTypeWithRef), 5899SymbolDisplay.ToDisplayParts(method, formatWithoutRef), 5912SymbolDisplay.ToDisplayParts(property, formatWithoutRef), 5927SymbolDisplay.ToDisplayParts(indexer, formatWithoutRef), 5947SymbolDisplay.ToDisplayParts(@delegate, formatWithoutRef), 5957SymbolDisplay.ToDisplayParts(method, formatWithRef), 5974SymbolDisplay.ToDisplayParts(property, formatWithRef), 5993SymbolDisplay.ToDisplayParts(indexer, formatWithRef), 6017SymbolDisplay.ToDisplayParts(@delegate, formatWithRef), 6031SymbolDisplay.ToDisplayParts(method, formatWithoutTypeWithRef), 6106SymbolDisplay.ToDisplayParts(method, formatWithoutNonNullableModifier), 6120SymbolDisplay.ToDisplayParts(method, formatWithNonNullableModifier), 6137SymbolDisplay.ToDisplayParts(method, formatWithoutNonNullableModifier), 6140SymbolDisplay.ToDisplayParts(method, formatWithNonNullableModifier), 6145SymbolDisplay.ToDisplayParts(method, formatWithoutNonNullableModifier), 6148SymbolDisplay.ToDisplayParts(method, formatWithNonNullableModifier), 6178SymbolDisplay.ToDisplayParts(method, formatWithoutNullableModifier), 6191SymbolDisplay.ToDisplayParts(method, formatWithNullableModifier), 6207SymbolDisplay.ToDisplayParts(method, formatWithoutNullableModifier), 6210SymbolDisplay.ToDisplayParts(method, formatWithNullableModifier), 6215SymbolDisplay.ToDisplayParts(method, formatWithoutNullableModifier), 6218SymbolDisplay.ToDisplayParts(method, formatWithNullableModifier), 6243SymbolDisplay.ToDisplayParts(member, formatWithoutModifiers), 6256SymbolDisplay.ToDisplayParts(member, formatWithNullableModifier), 6270SymbolDisplay.ToDisplayParts(member, formatWithBothModifiers), 6288SymbolDisplay.ToDisplayParts(member, formatWithoutModifiers), 6291SymbolDisplay.ToDisplayParts(member, formatWithNullableModifier), 6294SymbolDisplay.ToDisplayParts(member, formatWithBothModifiers), 6299SymbolDisplay.ToDisplayParts(member, formatWithoutModifiers), 6302SymbolDisplay.ToDisplayParts(member, formatWithNullableModifier), 6305SymbolDisplay.ToDisplayParts(member, formatWithBothModifiers), 6328SymbolDisplay.ToDisplayParts(method, formatWithoutAllowDefaultLiteral), 6331SymbolDisplay.ToDisplayParts(method, formatWithAllowDefaultLiteral), 6376Verify(SymbolDisplay.ToDisplayParts(member, formatWithoutModifiers), withoutModifiers); 6377Verify(SymbolDisplay.ToDisplayParts(member, formatWithNullableModifier), withNullableModifier); 6378Verify(SymbolDisplay.ToDisplayParts(member, formatWithBothModifiers), withBothModifiers); 6401SymbolDisplay.ToDisplayParts(method, format), 6455SymbolDisplay.ToDisplayParts(method1, formatWithoutAllowDefaultLiteral), 6458SymbolDisplay.ToDisplayParts(method1, formatWithAllowDefaultLiteral), 6463SymbolDisplay.ToDisplayParts(method2, formatWithoutAllowDefaultLiteral), 6466SymbolDisplay.ToDisplayParts(method2, formatWithAllowDefaultLiteral), 6471SymbolDisplay.ToDisplayParts(method3, formatWithoutAllowDefaultLiteral), 6474SymbolDisplay.ToDisplayParts(method3, formatWithAllowDefaultLiteral), 6499SymbolDisplay.ToDisplayParts(method, formatWithoutAllowDefaultLiteral), 6502SymbolDisplay.ToDisplayParts(method, formatWithAllowDefaultLiteral), 6528SymbolDisplay.ToDisplayParts(method, formatWithoutLongHandValueTuple), 6559SymbolDisplay.ToDisplayParts(method, formatWithLongHandValueTuple), 7691Verify(SymbolDisplay.ToDisplayParts(semanticModel.GetDeclaredSymbol(structure), format), 8487Verify(SymbolDisplay.ToDisplayParts(type), "<anonymous delegate>", 8490Verify(SymbolDisplay.ToDisplayParts(type, s_fullDelegateFormat), "delegate string <anonymous delegate>(ref int i)",
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
108var valueString = SymbolDisplay.FormatLiteral(val, quote: true); 115var literal = SymbolDisplay.FormatLiteral(val, quote: true);
Microsoft.CodeAnalysis.Test.Utilities (4)
Compilation\TestOperationVisitor.cs (4)
807CSharp.SymbolDisplay.ToDisplayString(method, SymbolDisplayFormat.TestFormat); 808CSharp.SymbolDisplay.ToDisplayString(method); 869CSharp.SymbolDisplay.ToDisplayString(operatorMethod, SymbolDisplayFormat.TestFormat); 870CSharp.SymbolDisplay.ToDisplayString(operatorMethod);
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
CodeGen\CodeGenTuples.vb (1)
23172Assert.Equal(expectedCSharp, CSharp.SymbolDisplay.ToDisplayString(type, SymbolDisplayFormat.TestFormat))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Semantics\BinaryOperators.vb (2)
1221Assert.Equal("System.String System.String.op_Concatenate(System.String left, System.String right)", CSharp.SymbolDisplay.ToDisplayString(symbol1, SymbolDisplayFormat.TestFormat)) 1222Assert.Equal("string.op_Concatenate(string, string)", CSharp.SymbolDisplay.ToDisplayString(symbol1))
Microsoft.Gen.Logging (1)
Emission\Emitter.Utils.cs (1)
16internal static string EscapeMessageString(string s) => SymbolDisplay.FormatLiteral(s, true);
System.Text.Json.SourceGeneration (4)
JsonSourceGenerator.Emitter.cs (2)
1459private static string FormatStringLiteral(string? value) => value is null ? "null" : SymbolDisplay.FormatLiteral(value, quote: true); 1460private static string FormatCharLiteral(char value) => SymbolDisplay.FormatLiteral(value, quote: true);
src\libraries\Common\src\SourceGenerators\CSharpSyntaxUtilities.cs (2)
28return SymbolDisplay.FormatLiteral(@string, quote: true); 30return SymbolDisplay.FormatLiteral(@char, quote: true);
System.Text.RegularExpressions.Generator (2)
RegexGenerator.Emitter.cs (2)
5414private static string Literal(char c) => SymbolDisplay.FormatLiteral(c, quote: true); 5417private static string Literal(string s, bool quote = true) => SymbolDisplay.FormatLiteral(s, quote);