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