211 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)
106=> CodeAnalysis.CSharp.SymbolDisplay.ToMinimalDisplayParts(symbol, semanticModel, position, format); 109=> 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 (88)
SymbolDisplay\SymbolDisplayTests.cs (88)
4676var parts = Microsoft.CodeAnalysis.CSharp.SymbolDisplay.ToDisplayParts(goo, format); 4885Assert.Equal("Outer.Inner<T>", CSharp.SymbolDisplay.ToDisplayString(type, SymbolDisplayFormat.TestFormat)); 4886Assert.Equal("void Outer.M<U>()", CSharp.SymbolDisplay.ToDisplayString(method, SymbolDisplayFormat.TestFormat)); 4887Assert.Equal("System.String Outer.P { set; }", CSharp.SymbolDisplay.ToDisplayString(property, SymbolDisplayFormat.TestFormat)); 4888Assert.Equal("System.Int32 Outer.F", CSharp.SymbolDisplay.ToDisplayString(field, SymbolDisplayFormat.TestFormat)); 4889Assert.Equal("event Outer.EEventHandler Outer.E", CSharp.SymbolDisplay.ToDisplayString(@event, SymbolDisplayFormat.TestFormat)); 4890Assert.Equal("Outer.D", CSharp.SymbolDisplay.ToDisplayString(@delegate, SymbolDisplayFormat.TestFormat)); 4891Assert.Equal("Missing Outer.Error()", CSharp.SymbolDisplay.ToDisplayString(error, SymbolDisplayFormat.TestFormat)); 4898Assert.Equal("1", SymbolDisplay.FormatPrimitive(1, quoteStrings: false, useHexadecimalNumbers: false)); 4899Assert.Equal("1", SymbolDisplay.FormatPrimitive((uint)1, quoteStrings: false, useHexadecimalNumbers: false)); 4900Assert.Equal("1", SymbolDisplay.FormatPrimitive((byte)1, quoteStrings: false, useHexadecimalNumbers: false)); 4901Assert.Equal("1", SymbolDisplay.FormatPrimitive((sbyte)1, quoteStrings: false, useHexadecimalNumbers: false)); 4902Assert.Equal("1", SymbolDisplay.FormatPrimitive((short)1, quoteStrings: false, useHexadecimalNumbers: false)); 4903Assert.Equal("1", SymbolDisplay.FormatPrimitive((ushort)1, quoteStrings: false, useHexadecimalNumbers: false)); 4904Assert.Equal("1", SymbolDisplay.FormatPrimitive((long)1, quoteStrings: false, useHexadecimalNumbers: false)); 4905Assert.Equal("1", SymbolDisplay.FormatPrimitive((ulong)1, quoteStrings: false, useHexadecimalNumbers: false)); 4906Assert.Equal("x", SymbolDisplay.FormatPrimitive('x', quoteStrings: false, useHexadecimalNumbers: false)); 4907Assert.Equal("true", SymbolDisplay.FormatPrimitive(true, quoteStrings: false, useHexadecimalNumbers: false)); 4908Assert.Equal("1.5", SymbolDisplay.FormatPrimitive(1.5, quoteStrings: false, useHexadecimalNumbers: false)); 4909Assert.Equal("1.5", SymbolDisplay.FormatPrimitive((float)1.5, quoteStrings: false, useHexadecimalNumbers: false)); 4910Assert.Equal("1.5", SymbolDisplay.FormatPrimitive((decimal)1.5, quoteStrings: false, useHexadecimalNumbers: false)); 4911Assert.Equal("null", SymbolDisplay.FormatPrimitive(null, quoteStrings: false, useHexadecimalNumbers: false)); 4912Assert.Equal("abc", SymbolDisplay.FormatPrimitive("abc", quoteStrings: false, useHexadecimalNumbers: false)); 4913Assert.Null(SymbolDisplay.FormatPrimitive(SymbolDisplayFormat.TestFormat, quoteStrings: false, useHexadecimalNumbers: false)); 5414SymbolDisplay.ToDisplayParts(symbol, format), 5419SymbolDisplay.ToDisplayParts(symbol, SymbolDisplayFormat.MinimallyQualifiedFormat), 5425SymbolDisplay.ToMinimalDisplayParts(symbol, model, text.IndexOf("offset 1"), format), 5428SymbolDisplay.ToMinimalDisplayParts(symbol, model, text.IndexOf("offset 2"), format), 5457SymbolDisplay.ToDisplayParts(model.GetSymbolInfo(actualThis).Symbol, SymbolDisplayFormat.MinimallyQualifiedFormat), 5467SymbolDisplay.ToDisplayParts(model.GetSymbolInfo(escapedThis).Symbol, SymbolDisplayFormat.MinimallyQualifiedFormat), 5523SymbolDisplay.ToDisplayParts(method, formatWithoutRef), 5536SymbolDisplay.ToDisplayParts(property, formatWithoutRef), 5551SymbolDisplay.ToDisplayParts(indexer, formatWithoutRef), 5569SymbolDisplay.ToDisplayParts(@delegate, formatWithoutRef), 5579SymbolDisplay.ToDisplayParts(method, formatWithRef), 5594SymbolDisplay.ToDisplayParts(property, formatWithRef), 5611SymbolDisplay.ToDisplayParts(indexer, formatWithRef), 5631SymbolDisplay.ToDisplayParts(@delegate, formatWithRef), 5643SymbolDisplay.ToDisplayParts(method, formatWithoutTypeWithRef), 5727SymbolDisplay.ToDisplayParts(method, formatWithoutRef), 5740SymbolDisplay.ToDisplayParts(property, formatWithoutRef), 5755SymbolDisplay.ToDisplayParts(indexer, formatWithoutRef), 5775SymbolDisplay.ToDisplayParts(@delegate, formatWithoutRef), 5785SymbolDisplay.ToDisplayParts(method, formatWithRef), 5802SymbolDisplay.ToDisplayParts(property, formatWithRef), 5821SymbolDisplay.ToDisplayParts(indexer, formatWithRef), 5845SymbolDisplay.ToDisplayParts(@delegate, formatWithRef), 5859SymbolDisplay.ToDisplayParts(method, formatWithoutTypeWithRef), 5934SymbolDisplay.ToDisplayParts(method, formatWithoutNonNullableModifier), 5948SymbolDisplay.ToDisplayParts(method, formatWithNonNullableModifier), 5965SymbolDisplay.ToDisplayParts(method, formatWithoutNonNullableModifier), 5968SymbolDisplay.ToDisplayParts(method, formatWithNonNullableModifier), 5973SymbolDisplay.ToDisplayParts(method, formatWithoutNonNullableModifier), 5976SymbolDisplay.ToDisplayParts(method, formatWithNonNullableModifier), 6006SymbolDisplay.ToDisplayParts(method, formatWithoutNullableModifier), 6019SymbolDisplay.ToDisplayParts(method, formatWithNullableModifier), 6035SymbolDisplay.ToDisplayParts(method, formatWithoutNullableModifier), 6038SymbolDisplay.ToDisplayParts(method, formatWithNullableModifier), 6043SymbolDisplay.ToDisplayParts(method, formatWithoutNullableModifier), 6046SymbolDisplay.ToDisplayParts(method, formatWithNullableModifier), 6071SymbolDisplay.ToDisplayParts(member, formatWithoutModifiers), 6084SymbolDisplay.ToDisplayParts(member, formatWithNullableModifier), 6098SymbolDisplay.ToDisplayParts(member, formatWithBothModifiers), 6116SymbolDisplay.ToDisplayParts(member, formatWithoutModifiers), 6119SymbolDisplay.ToDisplayParts(member, formatWithNullableModifier), 6122SymbolDisplay.ToDisplayParts(member, formatWithBothModifiers), 6127SymbolDisplay.ToDisplayParts(member, formatWithoutModifiers), 6130SymbolDisplay.ToDisplayParts(member, formatWithNullableModifier), 6133SymbolDisplay.ToDisplayParts(member, formatWithBothModifiers), 6156SymbolDisplay.ToDisplayParts(method, formatWithoutAllowDefaultLiteral), 6159SymbolDisplay.ToDisplayParts(method, formatWithAllowDefaultLiteral), 6204Verify(SymbolDisplay.ToDisplayParts(member, formatWithoutModifiers), withoutModifiers); 6205Verify(SymbolDisplay.ToDisplayParts(member, formatWithNullableModifier), withNullableModifier); 6206Verify(SymbolDisplay.ToDisplayParts(member, formatWithBothModifiers), withBothModifiers); 6229SymbolDisplay.ToDisplayParts(method, format), 6283SymbolDisplay.ToDisplayParts(method1, formatWithoutAllowDefaultLiteral), 6286SymbolDisplay.ToDisplayParts(method1, formatWithAllowDefaultLiteral), 6291SymbolDisplay.ToDisplayParts(method2, formatWithoutAllowDefaultLiteral), 6294SymbolDisplay.ToDisplayParts(method2, formatWithAllowDefaultLiteral), 6299SymbolDisplay.ToDisplayParts(method3, formatWithoutAllowDefaultLiteral), 6302SymbolDisplay.ToDisplayParts(method3, formatWithAllowDefaultLiteral), 6327SymbolDisplay.ToDisplayParts(method, formatWithoutAllowDefaultLiteral), 6330SymbolDisplay.ToDisplayParts(method, formatWithAllowDefaultLiteral), 6356SymbolDisplay.ToDisplayParts(method, formatWithoutLongHandValueTuple), 6387SymbolDisplay.ToDisplayParts(method, formatWithLongHandValueTuple), 7519Verify(SymbolDisplay.ToDisplayParts(semanticModel.GetDeclaredSymbol(structure), format), 8315Verify(SymbolDisplay.ToDisplayParts(type), "<anonymous delegate>", 8318Verify(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);