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