418 instantiations of SymbolDisplayFormat
ConfigurationSchemaGenerator (2)
RuntimeSource\Configuration.Binder\Parser\Extensions.cs (2)
68private static readonly SymbolDisplayFormat s_identifierCompatibleFormat = new SymbolDisplayFormat( 74private static readonly SymbolDisplayFormat s_minimalDisplayFormat = new SymbolDisplayFormat(
ILLink.RoslynAnalyzer (2)
ISymbolExtensions.cs (2)
118 new SymbolDisplayFormat ( 124 new SymbolDisplayFormat (
Microsoft.Analyzers.Local (4)
ApiLifecycle\AssemblyAnalysis.cs (4)
27new(globalNamespaceStyle: SymbolDisplayGlobalNamespaceStyle.OmittedAsContaining, 46new(globalNamespaceStyle: SymbolDisplayGlobalNamespaceStyle.OmittedAsContaining, 70new(globalNamespaceStyle: SymbolDisplayGlobalNamespaceStyle.OmittedAsContaining, 78new(globalNamespaceStyle: SymbolDisplayGlobalNamespaceStyle.OmittedAsContaining,
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
StaticRouteHandlerModel\Emitters\EmitterConstants.cs (2)
8public static SymbolDisplayFormat DisplayFormat => new SymbolDisplayFormat( 14public static SymbolDisplayFormat DisplayFormatWithoutNullability => new SymbolDisplayFormat(
Microsoft.CodeAnalysis (22)
CodeGen\CompilationTestData.cs (2)
87private static readonly SymbolDisplayFormat _testDataKeyFormat = new SymbolDisplayFormat( 111private static readonly SymbolDisplayFormat _testDataOperatorKeyFormat = new SymbolDisplayFormat(
SymbolDisplay\SymbolDisplayFormat.cs (20)
18new SymbolDisplayFormat( 44new SymbolDisplayFormat( 67new SymbolDisplayFormat( 100new SymbolDisplayFormat( 138new SymbolDisplayFormat( 150new SymbolDisplayFormat( 175new SymbolDisplayFormat( 218new SymbolDisplayFormat( 226new SymbolDisplayFormat( 236new SymbolDisplayFormat( 250new SymbolDisplayFormat( 267new SymbolDisplayFormat( 440return new SymbolDisplayFormat( 489return new SymbolDisplayFormat( 539return new SymbolDisplayFormat( 593return new SymbolDisplayFormat( 645return new SymbolDisplayFormat( 697return new SymbolDisplayFormat( 721return new SymbolDisplayFormat( 781return new SymbolDisplayFormat(
Microsoft.CodeAnalysis.CodeStyle (4)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
38private static readonly SymbolDisplayFormat ContainingTypeAndNameOnlyFormat = new(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamespaceOrTypeSymbolExtensions.cs (1)
19private static readonly SymbolDisplayFormat s_shortNameFormat = new(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolDisplayFormats.cs (2)
16new( 35new(
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
352var methodDisplay = methodToUpdate.ToDisplayString(new SymbolDisplayFormat( 424new(
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
40private static readonly SymbolDisplayFormat s_format = new(
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Expressions.cs (1)
9640new SymbolDisplayFormat(
Symbols\TypeWithAnnotations.cs (2)
65private static readonly SymbolDisplayFormat DebuggerDisplayFormat = new SymbolDisplayFormat( 70internal static readonly SymbolDisplayFormat TestDisplayFormat = new SymbolDisplayFormat(
Microsoft.CodeAnalysis.CSharp.Features (5)
Completion\CompletionProviders\CrefCompletionProvider.cs (1)
35new(globalNamespaceStyle: SymbolDisplayGlobalNamespaceStyle.Omitted,
Completion\CompletionProviders\PartialTypeCompletionProvider.cs (1)
31new(globalNamespaceStyle: SymbolDisplayGlobalNamespaceStyle.Omitted,
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
30new(
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (1)
32new SymbolDisplayFormat(
NavigationBar\CSharpNavigationBarItemService.cs (1)
30new(genericsOptions: SymbolDisplayGenericsOptions.IncludeTypeParameters,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\NullableReferenceTypesTests.cs (4)
76978.ToDisplayString(new SymbolDisplayFormat(delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature, 76982.ToDisplayString(new SymbolDisplayFormat(delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature, 76986.ToDisplayString(new SymbolDisplayFormat(delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature, 77051.ToDisplayString(new SymbolDisplayFormat(delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (142)
SymbolDisplay\SymbolDisplayTests.cs (140)
32var format = new SymbolDisplayFormat( 51var format = new SymbolDisplayFormat( 79var format = new SymbolDisplayFormat( 107var format = new SymbolDisplayFormat( 155var format = new SymbolDisplayFormat( 183var format = new SymbolDisplayFormat( 208var format = new SymbolDisplayFormat(); 237var format = new SymbolDisplayFormat(); 259var format = new SymbolDisplayFormat( 297var format = new SymbolDisplayFormat( 342var format = new SymbolDisplayFormat( 407var format = new SymbolDisplayFormat( 463var format = new SymbolDisplayFormat( 531var format = new SymbolDisplayFormat( 596var format = new SymbolDisplayFormat( 652var format = new SymbolDisplayFormat( 701var format = new SymbolDisplayFormat( 763var format = new SymbolDisplayFormat( 801var format = new SymbolDisplayFormat( 834var format = new SymbolDisplayFormat( 873var format = new SymbolDisplayFormat( 908var format = new SymbolDisplayFormat( 943var format = new SymbolDisplayFormat( 978var format = new SymbolDisplayFormat( 1013var format = new SymbolDisplayFormat( 1067var format = new SymbolDisplayFormat( 1108var format = new SymbolDisplayFormat( 1154var format = new SymbolDisplayFormat( 1183var format = new SymbolDisplayFormat( 1215var format = new SymbolDisplayFormat( 1258var format = new SymbolDisplayFormat( 1283var format = new SymbolDisplayFormat( 1310var format = new SymbolDisplayFormat( 1335var format = new SymbolDisplayFormat( 1359var format = new SymbolDisplayFormat( 1383var format = new SymbolDisplayFormat( 1409var format = new SymbolDisplayFormat( 1606var format = new SymbolDisplayFormat( 1636var format = new SymbolDisplayFormat( 1673var format = new SymbolDisplayFormat( 1713var format = new SymbolDisplayFormat( 1745var format = new SymbolDisplayFormat( 1777var format = new SymbolDisplayFormat( 1820var format = new SymbolDisplayFormat( 1843var format = new SymbolDisplayFormat( 1880var format = new SymbolDisplayFormat( 1903var format = new SymbolDisplayFormat( 1938var format = new SymbolDisplayFormat( 1961var format = new SymbolDisplayFormat( 1996var format = new SymbolDisplayFormat( 2064var format = new SymbolDisplayFormat( 2101var format = new SymbolDisplayFormat( 2143var format = new SymbolDisplayFormat( 2196var format = new SymbolDisplayFormat( 2231var format = new SymbolDisplayFormat( 2268var format = new SymbolDisplayFormat( 2305var format = new SymbolDisplayFormat( 2331var format = new SymbolDisplayFormat( 2361var format = new SymbolDisplayFormat( 2389var format = new SymbolDisplayFormat( 2480var format = new SymbolDisplayFormat( 2541var format = new SymbolDisplayFormat( 2585var format = new SymbolDisplayFormat( 2633var format = new SymbolDisplayFormat( 2666var format = new SymbolDisplayFormat( 2697var format = new SymbolDisplayFormat( 2731var format = new SymbolDisplayFormat( 2790var format = new SymbolDisplayFormat(); 2991new SymbolDisplayFormat( 3034new SymbolDisplayFormat(), 3039new SymbolDisplayFormat(miscellaneousOptions: SymbolDisplayMiscellaneousOptions.RemoveAttributeSuffix), 3057new SymbolDisplayFormat(), 3062new SymbolDisplayFormat(miscellaneousOptions: SymbolDisplayMiscellaneousOptions.RemoveAttributeSuffix), 3078new SymbolDisplayFormat(), 3083new SymbolDisplayFormat(miscellaneousOptions: SymbolDisplayMiscellaneousOptions.RemoveAttributeSuffix), 3472var format = new SymbolDisplayFormat(globalNamespaceStyle: SymbolDisplayFormat.CSharpErrorMessageFormat.GlobalNamespaceStyle, 3491format = new SymbolDisplayFormat(parameterOptions: SymbolDisplayParameterOptions.IncludeName | SymbolDisplayParameterOptions.IncludeType, 3527new SymbolDisplayFormat( 3581new SymbolDisplayFormat( 3633new SymbolDisplayFormat( 3681new SymbolDisplayFormat( 3762new SymbolDisplayFormat( 3836new SymbolDisplayFormat( 3948new SymbolDisplayFormat( 4058new SymbolDisplayFormat( 4162new SymbolDisplayFormat( 4266var format = new SymbolDisplayFormat( 4310var format = new SymbolDisplayFormat( 4357var format = new SymbolDisplayFormat( 4399var format = new SymbolDisplayFormat( 4434var format = new SymbolDisplayFormat( 4482var format = new SymbolDisplayFormat( 4523var format = new SymbolDisplayFormat( 4592var normalFormat = new SymbolDisplayFormat(); 4668var format = new SymbolDisplayFormat( 4702var format = new SymbolDisplayFormat( 4756var memberFormat = new SymbolDisplayFormat( 4760var typeFormat = new SymbolDisplayFormat( 4764var namespaceFormat = new SymbolDisplayFormat( 4946var memberFormat = new SymbolDisplayFormat( 5112var format = new SymbolDisplayFormat( 5141var f1 = new SymbolDisplayFormat(); 5142var f2 = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeParameters); 5155Assert.False(new FormattedSymbol(sA, new SymbolDisplayFormat()).Equals(new FormattedSymbol(sA, new SymbolDisplayFormat()))); 5174var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType); 5206var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, miscellaneousOptions: SymbolDisplayMiscellaneousOptions.CollapseTupleTypes); 5237var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, 5268var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType); 5305var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, 5356var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, 5402var format = new SymbolDisplayFormat( 5501var formatBase = new SymbolDisplayFormat( 5705var formatBase = new SymbolDisplayFormat( 5922var formatWithoutNonNullableModifier = new SymbolDisplayFormat( 5994var formatWithoutNullableModifier = new SymbolDisplayFormat( 6063var formatWithoutModifiers = new SymbolDisplayFormat( 6182var formatWithoutModifiers = new SymbolDisplayFormat( 6221var format = new SymbolDisplayFormat( 6344var formatWithoutLongHandValueTuple = new SymbolDisplayFormat( 6457SymbolDisplayFormat changeSignatureFormat = new SymbolDisplayFormat( 7757new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType), 7773new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType), 7790new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType), 7806new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType), 7817var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType); 7857new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType), 7867var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType); 7957var formatWithoutOptions = new SymbolDisplayFormat( 8037var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword); 8058var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword); 8079var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword); 8102var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword); 8131var format = new SymbolDisplayFormat(); 8152var format = new SymbolDisplayFormat(); 8173var format = new SymbolDisplayFormat(); 8194var format = new SymbolDisplayFormat(); 8203private static readonly SymbolDisplayFormat s_fullDelegateFormat = new SymbolDisplayFormat( 8649var formatMinimal = new SymbolDisplayFormat(); 8789var ideFormat = new SymbolDisplayFormat(
Symbols\CorLibrary\CorTypes.cs (1)
23private static readonly SymbolDisplayFormat s_languageNameFormat = new SymbolDisplayFormat(
Symbols\Source\MethodTests.cs (1)
1639new SymbolDisplayFormat(
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Simplification\CSharpSimplificationService.Expander.cs (1)
36new(
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
InstructionDecoder.cs (1)
20internal static readonly SymbolDisplayFormat DisplayFormat = new SymbolDisplayFormat(
Microsoft.CodeAnalysis.Features (27)
CodeLens\CodeLensReferencesService.cs (1)
25new(typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces,
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (1)
19new(
Debugging\AbstractBreakpointResolver.cs (1)
38new(
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
38new( 55new(
ExtractMethod\MethodExtractor.VariableSymbol.cs (3)
182new SymbolDisplayFormat( 236new SymbolDisplayFormat( 348new SymbolDisplayFormat(
FindUsages\DefinitionItemFactory.cs (1)
24private static readonly SymbolDisplayFormat s_namePartsFormat = new(
FindUsages\FindUsagesHelpers.cs (1)
60new(
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
268var displayName = equatableTypeOpt.ToDisplayString(new SymbolDisplayFormat(
GenerateFromMembers\AbstractGenerateFromMembersCodeRefactoringProvider.cs (1)
122new(
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (1)
29private static readonly SymbolDisplayFormat s_displayFormat = new(
InlineHints\AbstractInlineTypeHintsService.cs (1)
18protected static readonly SymbolDisplayFormat s_minimalTypeStyle = new SymbolDisplayFormat(
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (4)
25new(globalNamespaceStyle: SymbolDisplayGlobalNamespaceStyle.Omitted, 39new(globalNamespaceStyle: SymbolDisplayGlobalNamespaceStyle.Omitted, 69new(typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces, 77new(globalNamespaceStyle: SymbolDisplayGlobalNamespaceStyle.Included);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
227var documentTooltip = topLevelNamedType.ToDisplayString(new SymbolDisplayFormat(typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces));
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
299private static readonly SymbolDisplayFormat QualifiedNamespaceFormat = new(
PdbSourceDocument\ImplementationAssemblyLookupService.cs (1)
25private static readonly SymbolDisplayFormat s_metadataSymbolDisplayFormat = new SymbolDisplayFormat(
Shared\Extensions\ISymbolExtensions_2.cs (1)
234new(
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
38private static readonly SymbolDisplayFormat ContainingTypeAndNameOnlyFormat = new(
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
352var methodDisplay = methodToUpdate.ToDisplayString(new SymbolDisplayFormat( 424new(
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
40private static readonly SymbolDisplayFormat s_format = new(
Testing\AbstractTestMethodFinder.cs (1)
23private static readonly SymbolDisplayFormat s_methodSymbolNoParametersDisplayFormat = new(
Microsoft.CodeAnalysis.VisualBasic (5)
SymbolDisplay\CustomSymbolDisplayFormatter.vb (5)
16Friend Shared ReadOnly QualifiedNameFormat As SymbolDisplayFormat = New SymbolDisplayFormat( 29Friend Shared ReadOnly WithContainingTypeFormat As SymbolDisplayFormat = New SymbolDisplayFormat( 39Friend Shared ReadOnly ErrorMessageFormatNoModifiersNoReturnType As New SymbolDisplayFormat( 52Friend Shared ReadOnly ErrorNameWithKindFormat As New SymbolDisplayFormat( 64Friend Shared ReadOnly DelegateSignatureFormat As New SymbolDisplayFormat(
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (2)
17Public ReadOnly typeNameFormatWithGenerics As New SymbolDisplayFormat( 25Public ReadOnly typeNameFormatWithoutGenerics As New SymbolDisplayFormat(
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (1)
CompilationContext.vb (1)
24Private Shared ReadOnly s_fullNameFormat As New SymbolDisplayFormat(
Microsoft.CodeAnalysis.VisualBasic.Features (7)
CodeLens\VisualBasicDisplayInfoService.vb (1)
16Private Shared ReadOnly Format As SymbolDisplayFormat = New SymbolDisplayFormat(
Completion\CompletionProviders\CrefCompletionProvider.vb (1)
27New SymbolDisplayFormat(
Completion\CompletionProviders\PartialTypeCompletionProvider.vb (1)
26New SymbolDisplayFormat(
NavigationBar\VisualBasicNavigationBarItemService.vb (3)
25Private ReadOnly _typeFormat As SymbolDisplayFormat = New SymbolDisplayFormat( 28Private ReadOnly _memberFormat As SymbolDisplayFormat = New SymbolDisplayFormat( 401Dim displayFormat = If(members.Count() = 1 AndAlso firstMember.GetArity() = 0, New SymbolDisplayFormat(), _memberFormat)
SignatureHelp\GenericNameSignatureHelpProvider.NamedType.vb (1)
11Dim format = New SymbolDisplayFormat(
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (114)
SymbolDisplay\SymbolDisplayTests.vb (114)
35Dim format = New SymbolDisplayFormat( 70Dim format = New SymbolDisplayFormat( 80format = New SymbolDisplayFormat( 90format = New SymbolDisplayFormat( 166Dim format = New SymbolDisplayFormat() 201Dim format = New SymbolDisplayFormat() 223Dim format = New SymbolDisplayFormat( 256Dim format = New SymbolDisplayFormat( 294Dim format = New SymbolDisplayFormat( 326Dim format = New SymbolDisplayFormat( 359Dim format = New SymbolDisplayFormat( 378format = New SymbolDisplayFormat( 419Dim format = New SymbolDisplayFormat( 479Dim format = New SymbolDisplayFormat( 547Dim format = New SymbolDisplayFormat( 603Dim format = New SymbolDisplayFormat( 674Dim format = New SymbolDisplayFormat( 745Dim format = New SymbolDisplayFormat( 811Dim format = New SymbolDisplayFormat( 870Dim format = New SymbolDisplayFormat( 970Dim format = New SymbolDisplayFormat( 1028Dim format = New SymbolDisplayFormat( 1048format = New SymbolDisplayFormat( 1066format = New SymbolDisplayFormat( 1086format = New SymbolDisplayFormat( 1116format = New SymbolDisplayFormat( 1144format = New SymbolDisplayFormat( 1174format = New SymbolDisplayFormat( 1188format = New SymbolDisplayFormat( 1233format = New SymbolDisplayFormat( 1249format = New SymbolDisplayFormat( 1277Dim format = New SymbolDisplayFormat( 1326Dim format = New SymbolDisplayFormat(memberOptions:=SymbolDisplayMemberOptions.None) 1356Dim format = New SymbolDisplayFormat(memberOptions:=SymbolDisplayMemberOptions.IncludeExplicitInterface) 1386Dim format = New SymbolDisplayFormat( 1411Dim format = New SymbolDisplayFormat( 1440Dim format = New SymbolDisplayFormat( 1451format = New SymbolDisplayFormat( 1479Dim format = New SymbolDisplayFormat( 1511Dim format As SymbolDisplayFormat = New SymbolDisplayFormat( 1606Dim format = New SymbolDisplayFormat( 1639Dim format = New SymbolDisplayFormat( 1676Dim format = New SymbolDisplayFormat( 1716Dim format = New SymbolDisplayFormat( 1751Dim format = New SymbolDisplayFormat( 1786Dim format = New SymbolDisplayFormat( 1833Dim format = New SymbolDisplayFormat( 1859Dim format = New SymbolDisplayFormat( 1899Dim format = New SymbolDisplayFormat( 1948Dim format = New SymbolDisplayFormat( 1984Dim format = New SymbolDisplayFormat( 2026Dim format = New SymbolDisplayFormat( 2050Dim format = New SymbolDisplayFormat( 2074Dim format = New SymbolDisplayFormat( 2114Dim format = New SymbolDisplayFormat( 2166Dim format = New SymbolDisplayFormat( 2222Dim format = New SymbolDisplayFormat( 2273Dim format = New SymbolDisplayFormat( 2316Dim format = New SymbolDisplayFormat( 2372Dim format = New SymbolDisplayFormat( 2414Dim format = New SymbolDisplayFormat( 2443Dim format = New SymbolDisplayFormat( 2506Dim format = New SymbolDisplayFormat( 2581Dim format = New SymbolDisplayFormat( 2617format = New SymbolDisplayFormat( 2666Dim format = New SymbolDisplayFormat( 2718Dim format = New SymbolDisplayFormat( 2750Dim format = New SymbolDisplayFormat( 2795Dim format = New SymbolDisplayFormat( 2857Dim format = New SymbolDisplayFormat( 2925Dim format = New SymbolDisplayFormat( 3002Dim format = New SymbolDisplayFormat( 3094Dim format = New SymbolDisplayFormat( 3276Dim format = New SymbolDisplayFormat( 3316Dim format = New SymbolDisplayFormat( 3349Dim format = New SymbolDisplayFormat( 3462Dim format = New SymbolDisplayFormat( 3521Dim format = New SymbolDisplayFormat( 3597Dim format = New SymbolDisplayFormat( 3656Dim format = New SymbolDisplayFormat( 3699Dim format = New SymbolDisplayFormat( 3790Dim format = New SymbolDisplayFormat() 3912TestSymbolDescription(text, findSymbol, New SymbolDisplayFormat(), 3916TestSymbolDescription(text, findSymbol, New SymbolDisplayFormat(miscellaneousOptions:=SymbolDisplayMiscellaneousOptions.RemoveAttributeSuffix), 3937TestSymbolDescription(text, findSymbol, New SymbolDisplayFormat(), 3942New SymbolDisplayFormat(miscellaneousOptions:=SymbolDisplayMiscellaneousOptions.RemoveAttributeSuffix), 3962TestSymbolDescription(text, findSymbol, New SymbolDisplayFormat(), 3967New SymbolDisplayFormat(miscellaneousOptions:=SymbolDisplayMiscellaneousOptions.RemoveAttributeSuffix), 3986TestSymbolDescription(text, findSymbol, New SymbolDisplayFormat(), 3991New SymbolDisplayFormat(miscellaneousOptions:=SymbolDisplayMiscellaneousOptions.RemoveAttributeSuffix), 4014Dim format = New SymbolDisplayFormat( 4050Dim format = New SymbolDisplayFormat(parameterOptions:=SymbolDisplayParameterOptions.IncludeName) 4078Dim format = New SymbolDisplayFormat( 4099Dim m_DelegateSignatureFormat As New SymbolDisplayFormat( 4137Dim format = New SymbolDisplayFormat( 4189Dim format = New SymbolDisplayFormat( 4239Dim format = New SymbolDisplayFormat( 4403Dim format = New SymbolDisplayFormat( 4459Dim format = New SymbolDisplayFormat( 4573New SymbolDisplayFormat(typeQualificationStyle:=SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces), 4696Dim normalFormat As New SymbolDisplayFormat() 4737Dim format = New SymbolDisplayFormat(memberOptions:=SymbolDisplayMemberOptions.IncludeParameters Or 4957New SymbolDisplayFormat(memberOptions:=SymbolDisplayMemberOptions.IncludeType), 4982Dim format = New SymbolDisplayFormat(memberOptions:=SymbolDisplayMemberOptions.IncludeType, miscellaneousOptions:=SymbolDisplayMiscellaneousOptions.CollapseTupleTypes) 5009New SymbolDisplayFormat(memberOptions:=SymbolDisplayMemberOptions.IncludeType, 5037New SymbolDisplayFormat(memberOptions:=SymbolDisplayMemberOptions.IncludeType), 5070New SymbolDisplayFormat( 5115New SymbolDisplayFormat( 5160Dim format = New SymbolDisplayFormat( 5201Dim format = New SymbolDisplayFormat( 5348Dim formatWithRef = New SymbolDisplayFormat( 5534Dim format = New SymbolDisplayFormat( 5768Dim ideFormat = New SymbolDisplayFormat( 5913Dim formatWithoutLongHandValueTuple = New SymbolDisplayFormat(
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (2)
17Public ReadOnly typeNameFormatWithGenerics As New SymbolDisplayFormat( 25Public ReadOnly typeNameFormatWithoutGenerics As New SymbolDisplayFormat(
Microsoft.CodeAnalysis.Workspaces (5)
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (1)
263new(
Rename\ConflictEngine\ConflictResolver.cs (1)
28private static readonly SymbolDisplayFormat s_metadataSymbolDisplayFormat = new(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamespaceOrTypeSymbolExtensions.cs (1)
19private static readonly SymbolDisplayFormat s_shortNameFormat = new(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolDisplayFormats.cs (2)
16new( 35new(
Microsoft.DotNet.CodeAnalysis (1)
Helpers.cs (1)
11new SymbolDisplayFormat(
Microsoft.Interop.JavaScript.JSImportGenerator (2)
JSSignatureContext.cs (2)
14private static SymbolDisplayFormat TypeAndContainingTypesStyle { get; } = new SymbolDisplayFormat( 19private static SymbolDisplayFormat TypeContainingTypesAndNamespacesStyle { get; } = new SymbolDisplayFormat(
Microsoft.VisualStudio.LanguageServices (23)
CallHierarchy\CallHierarchyItem.cs (3)
54new( 68new( 76new(
ChangeSignature\AddParameterDialogViewModel.cs (1)
52private static readonly SymbolDisplayFormat s_symbolDisplayFormat = new(
ChangeSignature\ChangeSignatureDialogViewModel.cs (2)
289private static readonly SymbolDisplayFormat s_symbolDeclarationDisplayFormat = new( 303private static readonly SymbolDisplayFormat s_parameterDisplayFormat = new(
F1Help\AbstractHelpContextService.cs (3)
21new( 29new( 38new(
Implementation\ContainedLanguageRefactorNotifyService.cs (1)
25private static readonly SymbolDisplayFormat s_qualifiedDisplayFormat = new(
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (2)
25private static readonly SymbolDisplayFormat s_typeDisplay = new( 115var typeDisplayFormat = new SymbolDisplayFormat(
Library\ObjectBrowser\AbstractListItemFactory.cs (7)
26new(typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameOnly); 29new( 33new( 39new( 43new( 49new( 53new(
Library\ObjectBrowser\Extensions.cs (2)
18private static readonly SymbolDisplayFormat s_typeDisplayFormat = new( 22private static readonly SymbolDisplayFormat s_memberDisplayFormat = new(
Utilities\SymbolViewModel.cs (2)
20private static readonly SymbolDisplayFormat s_symbolDisplayFormat = new( 26private static readonly SymbolDisplayFormat s_symbolAutomationFormat = new(
Microsoft.VisualStudio.LanguageServices.CSharp (14)
CodeModel\CSharpCodeModelService.cs (5)
58new( 64new( 70new( 75new( 83new(
ObjectBrowser\CSharpLibraryService.cs (2)
19private static readonly SymbolDisplayFormat s_typeDisplayFormat = new( 23private static readonly SymbolDisplayFormat s_memberDisplayFormat = new(
ObjectBrowser\DescriptionBuilder.cs (3)
49var typeNameFormat = new SymbolDisplayFormat( 92var typeNameFormat = new SymbolDisplayFormat( 220var methodNameFormat = new SymbolDisplayFormat(
ObjectBrowser\ListItemFactory.cs (2)
15new( 23new(
Progression\CSharpProgressionLanguageService.cs (2)
24private static readonly SymbolDisplayFormat s_descriptionFormat = new( 35private static readonly SymbolDisplayFormat s_labelFormat = new(
Microsoft.VisualStudio.LanguageServices.VisualBasic (20)
CodeModel\MethodXML\MethodXmlBuilder.vb (1)
16Private Shared ReadOnly s_fullNameFormat As New SymbolDisplayFormat(
CodeModel\VisualBasicCodeModelService.vb (6)
59New SymbolDisplayFormat( 65New SymbolDisplayFormat( 71New SymbolDisplayFormat( 77New SymbolDisplayFormat( 85New SymbolDisplayFormat( 91New SymbolDisplayFormat(
CodeModel\VisualBasicCodeModelService_Prototype.vb (2)
18New SymbolDisplayFormat( 25New SymbolDisplayFormat(
ObjectBrowser\DescriptionBuilder.vb (5)
42Dim typeNameFormat = New SymbolDisplayFormat( 82Dim typeNameFormat = New SymbolDisplayFormat( 137Dim methodNameFormat = New SymbolDisplayFormat() 172Dim methodNameFormat = New SymbolDisplayFormat() 206Dim methodNameFormat = New SymbolDisplayFormat()
ObjectBrowser\ListItemFactory.vb (2)
13New SymbolDisplayFormat( 21New SymbolDisplayFormat(
ObjectBrowser\VisualBasicLibraryService.vb (2)
16Private Shared ReadOnly s_typeDisplayFormat As New SymbolDisplayFormat( 21New SymbolDisplayFormat(
Progression\VisualBasicProgressionLanguageService.vb (2)
59Private Shared ReadOnly s_descriptionFormat As SymbolDisplayFormat = New SymbolDisplayFormat( 71Private Shared ReadOnly s_labelFormat As SymbolDisplayFormat = New SymbolDisplayFormat(
1512 references to SymbolDisplayFormat
ConfigurationSchemaGenerator (3)
RuntimeSource\Configuration.Binder\Parser\Extensions.cs (2)
68private static readonly SymbolDisplayFormat s_identifierCompatibleFormat = new SymbolDisplayFormat( 74private static readonly SymbolDisplayFormat s_minimalDisplayFormat = new SymbolDisplayFormat(
RuntimeSource\SourceGenerators\TypeModelHelper.cs (1)
38public static string GetFullyQualifiedName(this ITypeSymbol type) => type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
ILLink.RoslynAnalyzer (2)
ISymbolExtensions.cs (2)
117 public static SymbolDisplayFormat ILLinkTypeDisplayFormat { get; } = 123 public static SymbolDisplayFormat ILLinkMemberDisplayFormat { get; } =
Microsoft.Analyzers.Local (5)
ApiLifecycle\AssemblyAnalysis.cs (4)
26private static readonly SymbolDisplayFormat _format = 45private static readonly SymbolDisplayFormat _formatNoVariance = 69private static readonly SymbolDisplayFormat _shortSymbolNameFormat = 77private static readonly SymbolDisplayFormat _enumType =
Utilities\SymbolExtensions.cs (1)
54var attrType = a.AttributeClass?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
Microsoft.AspNetCore.Analyzers (1)
OptionsFacts.cs (1)
16if (string.Equals(item.OptionsType.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), SymbolNames.MvcOptions.MetadataName) &&
Microsoft.AspNetCore.Analyzers.Test (1)
ConfigureMethodVisitorTest.cs (1)
86.Select(m => m.ContainingType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + "." + m.Name)
Microsoft.AspNetCore.Components.Analyzers (12)
ComponentParameterAnalyzer.cs (8)
87property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 94property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 108property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), 109property.Type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), 110symbols.ParameterCaptureUnmatchedValuesRuntimeType.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 118property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 129type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), 133captureUnmatchedValuesParameters.Select(p => p.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)).OrderBy(n => n))));
InternalUsageAnalyzer.cs (4)
140symbol.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 150containingType.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 169symbol.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 179containingType.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat)));
Microsoft.AspNetCore.Components.SdkAnalyzers (11)
ComponentParameterAnalyzer.cs (7)
81property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 88property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 102property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), 103property.Type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), 104symbols.ParameterCaptureUnmatchedValuesRuntimeType.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 116type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), 120captureUnmatchedValuesParameters.Select(p => p.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)).OrderBy(n => n))));
InternalUsageAnalyzer.cs (4)
140symbol.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 150containingType.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 169symbol.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 179containingType.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat)));
Microsoft.AspNetCore.Http.RequestDelegateGenerator (32)
StaticRouteHandlerModel\Emitters\EmitterConstants.cs (2)
8public static SymbolDisplayFormat DisplayFormat => new SymbolDisplayFormat( 14public static SymbolDisplayFormat DisplayFormatWithoutNullability => new SymbolDisplayFormat(
StaticRouteHandlerModel\Emitters\EmitterExtensions.cs (2)
20? $"{endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat)}.BindAsync(HttpContext)" 21: $"{endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat)}.BindAsync(HttpContext, ParameterInfo)",
StaticRouteHandlerModel\Emitters\EndpointEmitter.cs (1)
120var shortParameterTypeName = parameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat);
StaticRouteHandlerModel\Emitters\EndpointParameterEmitter.cs (15)
47codeWriter.WriteLine($@"logOrThrowExceptionHelper.RequiredParameterNotProvided({SymbolDisplay.FormatLiteral(endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat), true)}, {SymbolDisplay.FormatLiteral(endpointParameter.SymbolName, true)}, {SymbolDisplay.FormatLiteral(endpointParameter.ToMessageString(), true)});"); 64var shortParameterTypeName = endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat); 83codeWriter.WriteLine($@"logOrThrowExceptionHelper.RequiredParameterNotProvided({SymbolDisplay.FormatLiteral(endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat), true)}, {SymbolDisplay.FormatLiteral(endpointParameter.SymbolName, true)}, {SymbolDisplay.FormatLiteral(endpointParameter.ToMessageString(), true)});"); 128codeWriter.WriteLine($"{endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)} {endpointParameter.EmitHandlerArgument()} = {endpointParameter.EmitTempArgument()}!;"); 167codeWriter.WriteLine($"{endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)} {endpointParameter.EmitHandlerArgument()} = {endpointParameter.EmitParsedTempArgument()}!;"); 172codeWriter.WriteLine($"{endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)} {endpointParameter.EmitHandlerArgument()} = {endpointParameter.EmitTempArgument()}!;"); 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)});"); 255var shortParameterTypeName = endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat); 316var shortParameterTypeName = endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat); 341var bindMethodReceiverTypeString = bindMethodReceiverType?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); 344var unwrappedTypeString = unwrappedType?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); 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 (12)
167endpoint.Diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.InvalidAsParametersNullable, location, Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 183AssigningCode = $"new {namedTypeSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)} {{ {parameterList} }}"; 188AssigningCode = $"new {namedTypeSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}({parameterList})"; 343ParsabilityMethod.IParsable => (string inputArgument, string outputArgument) => $$"""GeneratedRouteBuilderExtensionsCore.TryParseExplicit<{{parameterType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}}>({{inputArgument}}!, CultureInfo.InvariantCulture, out var {{outputArgument}})""", 344ParsabilityMethod.TryParseWithFormatProvider => (string inputArgument, string outputArgument) => $$"""{{parameterType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}}.TryParse({{inputArgument}}!, CultureInfo.InvariantCulture, out var {{outputArgument}})""", 345ParsabilityMethod.TryParse => (string inputArgument, string outputArgument) => $$"""{{parameterType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}}.TryParse({{inputArgument}}!, out var {{outputArgument}})""", 346ParsabilityMethod.Enum => (string inputArgument, string outputArgument) => $$"""Enum.TryParse<{{parameterType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}}>({{inputArgument}}!, out var {{outputArgument}})""", 355preferredTryParseInvocation = (string inputArgument, string outputArgument) => $$"""{{parameterType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}}.TryParse({{inputArgument}}!, out var {{outputArgument}})"""; 359preferredTryParseInvocation = (string inputArgument, string outputArgument) => $$"""{{parameterType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}}.TryParse({{inputArgument}}!, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AllowWhiteSpaces, out var {{outputArgument}})"""; 363preferredTryParseInvocation = (string inputArgument, string outputArgument) => $$"""{{parameterType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}}.TryParse({{inputArgument}}!, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AllowWhiteSpaces, out var {{outputArgument}})"""; 367preferredTryParseInvocation = (string inputArgument, string outputArgument) => $$"""{{parameterType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}}.TryParse({{inputArgument}}!, CultureInfo.InvariantCulture, DateTimeStyles.AllowWhiteSpaces, out var {{outputArgument}})"""; 461var parameterTypeString = type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat);
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
AddResponseTypeAttributeCodeFixAction.cs (1)
219SyntaxFactory.ParseTypeName(typeSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat))
Microsoft.CodeAnalysis (64)
CodeGen\CompilationTestData.cs (3)
87private static readonly SymbolDisplayFormat _testDataKeyFormat = new SymbolDisplayFormat( 111private static readonly SymbolDisplayFormat _testDataOperatorKeyFormat = new SymbolDisplayFormat( 128var format = (iMethod.MethodKind == MethodKind.UserDefinedOperator) ?
DiagnosticAnalyzer\SymbolDeclaredCompilationEvent.cs (1)
54return "SymbolDeclaredCompilationEvent(" + name + " " + Symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat) + loc + ")";
Emit\NoPia\CommonEmbeddedMethod.cs (1)
310return UnderlyingMethod.GetInternalSymbol().GetISymbol().ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat);
Emit\NoPia\CommonEmbeddedParameter.cs (1)
271return ((ISymbol)UnderlyingParameter).ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat);
Emit\NoPia\CommonEmbeddedType.cs (1)
715return UnderlyingNamedType.GetInternalSymbol().GetISymbol().ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat);
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (2)
60private static readonly SymbolDisplayFormat s_metadataDisplayFormat = 61SymbolDisplayFormat.QualifiedNameArityFormat.AddCompilerInternalOptions(SymbolDisplayCompilerInternalOptions.UsePlusForNestedTypes);
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (3)
17private SymbolDisplayFormat _format = null!; 33protected SymbolDisplayFormat Format => _format; 71SymbolDisplayFormat format,
SymbolDisplay\FormattedSymbol.cs (2)
23private readonly SymbolDisplayFormat _symbolDisplayFormat; 25internal FormattedSymbol(ISymbolInternal symbol, SymbolDisplayFormat symbolDisplayFormat)
SymbolDisplay\FormattedSymbolList.cs (2)
19private readonly SymbolDisplayFormat _symbolDisplayFormat; 21internal FormattedSymbolList(IEnumerable<ISymbol> symbols, SymbolDisplayFormat symbolDisplayFormat = null)
SymbolDisplay\SymbolDisplayFormat.cs (37)
17public static SymbolDisplayFormat CSharpErrorMessageFormat { get; } = 37internal static SymbolDisplayFormat CSharpErrorMessageNoParameterNamesFormat { get; } = CSharpErrorMessageFormat 43public static SymbolDisplayFormat CSharpShortErrorMessageFormat { get; } = 66public static SymbolDisplayFormat VisualBasicErrorMessageFormat { get; } = 99public static SymbolDisplayFormat VisualBasicShortErrorMessageFormat { get; } = 137public static SymbolDisplayFormat FullyQualifiedFormat { get; } = 149public static SymbolDisplayFormat MinimallyQualifiedFormat { get; } = 174internal static readonly SymbolDisplayFormat TestFormat = 210internal static readonly SymbolDisplayFormat TestFormatWithConstraints = TestFormat.WithGenericsOptions(TestFormat.GenericsOptions | SymbolDisplayGenericsOptions.IncludeTypeConstraints). 217internal static readonly SymbolDisplayFormat QualifiedNameOnlyFormat = 225internal static readonly SymbolDisplayFormat QualifiedNameArityFormat = 235internal static readonly SymbolDisplayFormat ShortFormat = 249internal static readonly SymbolDisplayFormat ILVisualizationFormat = 266internal static readonly SymbolDisplayFormat ExplicitInterfaceImplementationFormat = 336/// Constructs a new instance of <see cref="SymbolDisplayFormat"/> accepting a variety of optional parameters. 438public SymbolDisplayFormat WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions options) 463public SymbolDisplayFormat AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions options) 475public SymbolDisplayFormat RemoveMiscellaneousOptions(SymbolDisplayMiscellaneousOptions options) 487public SymbolDisplayFormat WithGenericsOptions(SymbolDisplayGenericsOptions options) 511public SymbolDisplayFormat AddGenericsOptions(SymbolDisplayGenericsOptions options) 525public SymbolDisplayFormat RemoveGenericsOptions(SymbolDisplayGenericsOptions options) 537public SymbolDisplayFormat WithMemberOptions(SymbolDisplayMemberOptions options) 563public SymbolDisplayFormat AddMemberOptions(SymbolDisplayMemberOptions options) 577public SymbolDisplayFormat RemoveMemberOptions(SymbolDisplayMemberOptions options) 591public SymbolDisplayFormat WithKindOptions(SymbolDisplayKindOptions options) 617public SymbolDisplayFormat AddKindOptions(SymbolDisplayKindOptions options) 631public SymbolDisplayFormat RemoveKindOptions(SymbolDisplayKindOptions options) 643public SymbolDisplayFormat WithParameterOptions(SymbolDisplayParameterOptions options) 669public SymbolDisplayFormat AddParameterOptions(SymbolDisplayParameterOptions options) 683public SymbolDisplayFormat RemoveParameterOptions(SymbolDisplayParameterOptions options) 695public SymbolDisplayFormat WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle style) 719public SymbolDisplayFormat WithLocalOptions(SymbolDisplayLocalOptions options) 745public SymbolDisplayFormat AddLocalOptions(SymbolDisplayLocalOptions options) 759public SymbolDisplayFormat RemoveLocalOptions(SymbolDisplayLocalOptions options) 767internal SymbolDisplayFormat AddCompilerInternalOptions(SymbolDisplayCompilerInternalOptions options) 773internal SymbolDisplayFormat RemoveCompilerInternalOptions(SymbolDisplayCompilerInternalOptions options) 779internal SymbolDisplayFormat WithCompilerInternalOptions(SymbolDisplayCompilerInternalOptions options)
Symbols\ISymbol.cs (4)
235string ToDisplayString(SymbolDisplayFormat? format = null); 244ImmutableArray<SymbolDisplayPart> ToDisplayParts(SymbolDisplayFormat? format = null); 259SymbolDisplayFormat? format = null); 274SymbolDisplayFormat? format = null);
Symbols\ITypeSymbol.cs (6)
144string ToDisplayString(NullableFlowState topLevelNullability, SymbolDisplayFormat? format = null); 153ImmutableArray<SymbolDisplayPart> ToDisplayParts(NullableFlowState topLevelNullability, SymbolDisplayFormat? format = null); 163/// <param name="format">Formatting rules - null implies <see cref="SymbolDisplayFormat.MinimallyQualifiedFormat"/></param> 169SymbolDisplayFormat? format = null); 179/// <param name="format">Formatting rules - null implies <see cref="SymbolDisplayFormat.MinimallyQualifiedFormat"/></param> 185SymbolDisplayFormat? format = null);
TreeDumper.cs (1)
226return symbol.ToDisplayString(SymbolDisplayFormat.TestFormat);
Microsoft.CodeAnalysis.CodeStyle (6)
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (2)
30private static readonly SymbolDisplayFormat s_namespaceDisplayFormat = SymbolDisplayFormat
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
38private static readonly SymbolDisplayFormat ContainingTypeAndNameOnlyFormat = new(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamespaceOrTypeSymbolExtensions.cs (1)
19private static readonly SymbolDisplayFormat s_shortNameFormat = new(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolDisplayFormats.cs (2)
15public static readonly SymbolDisplayFormat NameFormat = 34public static readonly SymbolDisplayFormat SignatureFormat =
Microsoft.CodeAnalysis.CodeStyle.Fixes (14)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
423private static readonly SymbolDisplayFormat SimpleFormat =
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\AbstractImplementAbstractClassCodeFixProvider.cs (2)
48var id = GetCodeActionId(abstractClassType.ContainingAssembly.Name, abstractClassType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)); 60abstractClassType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceCodeFixProvider.cs (1)
106var typeName = interfaceType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (1)
26protected abstract string ToDisplayString(IMethodSymbol disposeImplMethod, SymbolDisplayFormat format);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
40private static readonly SymbolDisplayFormat s_format = new(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (4)
198public string ToDisplayString(SymbolDisplayFormat format = null) 201public ImmutableArray<SymbolDisplayPart> ToDisplayParts(SymbolDisplayFormat format = null) 204public string ToMinimalDisplayString(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null) 207public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (4)
64public string ToDisplayString(NullableFlowState topLevelNullability, SymbolDisplayFormat format = null) 67public ImmutableArray<SymbolDisplayPart> ToDisplayParts(NullableFlowState topLevelNullability, SymbolDisplayFormat format = null) 70public string ToMinimalDisplayString(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null) 73public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null)
Microsoft.CodeAnalysis.CSharp (137)
Binder\Binder.ValueChecks.cs (1)
3308Error(diagnostics, ReadOnlyErrors[index], node, symbolKind, new FormattedSymbol(symbol, SymbolDisplayFormat.ShortFormat));
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
79var info = new CSDiagnosticInfo(ErrorCode.ERR_UnsupportedTransparentIdentifierAccess, name, new FormattedSymbol(receiver.ExpressionSymbol ?? receiverType, SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat));
Binder\Binder_Attributes.cs (2)
252Error(diagnostics, ErrorCode.ERR_AttributeCtorInParameter, node, attributeConstructor.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 962Binder.Error(diagnostics, ErrorCode.ERR_AttrArgWithTypeVars, node.Syntax, typeOfArgument.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat));
Binder\Binder_Expressions.cs (1)
9639private static readonly SymbolDisplayFormat s_propertyGroupFormat =
Binder\Binder_Symbols.cs (5)
2053new FormattedSymbol(first, SymbolDisplayFormat.CSharpErrorMessageFormat), 2054new FormattedSymbol(second, SymbolDisplayFormat.CSharpErrorMessageFormat) }); 2199new FormattedSymbol(first, SymbolDisplayFormat.CSharpErrorMessageFormat), 2200new FormattedSymbol(second, SymbolDisplayFormat.CSharpErrorMessageFormat) }); 2701var fullMetadataName = MetadataHelpers.BuildQualifiedName(qualifierOpt?.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat), metadataName);
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (5)
1249new FormattedSymbol(unwrapIfParamsCollection(badArg, parameter, isLastParameter), SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat)); 1317new FormattedSymbol(parameter, SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat)); 1363new FormattedSymbol(unwrapIfParamsCollection(badArg, parameter, isLastParameter), SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat)); 1510new FormattedSymbol(first, SymbolDisplayFormat.CSharpErrorMessageFormat), 1511new FormattedSymbol(second, SymbolDisplayFormat.CSharpErrorMessageFormat)
BoundTree\UnboundLambda.cs (2)
1267builder.Builder.Append(parameter.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat)); 1272builder.Builder.Append(lambda.ReturnTypeWithAnnotations.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
Emitter\EditAndContinue\EmitHelpers.cs (1)
175string.Format(CodeAnalysisResources.Type0DoesNotHaveExpectedConstructor, type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)));
Emitter\Model\ExpandedVarargsMethodReference.cs (1)
217result.Builder.Append(symbol.ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat));
Emitter\Model\FunctionPointerTypeSymbolAdapter.cs (1)
91public override string ToString() => _underlying.ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat);
Emitter\Model\NamedTypeReference.cs (1)
151return UnderlyingNamedType.ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat);
Emitter\Model\ParameterTypeInformation.cs (1)
66return _underlyingParameter.ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat);
Emitter\Model\PEModuleBuilder.cs (1)
751orderedForwardedTypes = orderedForwardedTypes.OrderBy(t => t.OriginalDefinition.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat));
Emitter\Model\TypeMemberReference.cs (1)
36return UnderlyingSymbol.ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat);
Emitter\NoPia\EmbeddedType.cs (1)
282UnderlyingNamedType.AdaptedNamedTypeSymbol.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat))),
Emitter\NoPia\EmbeddedTypesManager.cs (1)
503Error(diagnostics, ErrorCode.ERR_InteropMethodWithBody, syntaxNodeOpt, method.AdaptedMethodSymbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));
Errors\MessageProvider.cs (1)
106return SymbolDisplay.ToDisplayString(symbol, SymbolDisplayFormat.CSharpShortErrorMessageFormat);
FlowAnalysis\NullableWalker.cs (3)
2237new FormattedSymbol(parameterOpt, SymbolDisplayFormat.ShortFormat); 2245new FormattedSymbol(containingSymbol, SymbolDisplayFormat.MinimallyQualifiedFormat); 8654new FormattedSymbol(sourceInvokeMethod, SymbolDisplayFormat.MinimallyQualifiedFormat),
FlowAnalysis\NullableWalker.SnapshotManager.cs (2)
130Was {originalSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)} 131Now {updatedSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}");
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
216Error(diagnostic, node, new FormattedSymbol(symbol, SymbolDisplayFormat.ShortFormat));
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
223diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInParameterTypeOnInterceptor, attributeLocation, new FormattedSymbol(implementingParameter, SymbolDisplayFormat.ShortFormat), method);
SymbolDisplay\SymbolDisplay.cs (32)
22/// Displays a symbol in the C# style, based on a <see cref="SymbolDisplayFormat"/>. 25/// <param name="format">The formatting options to apply. If null is passed, <see cref="SymbolDisplayFormat.CSharpErrorMessageFormat"/> will be used.</param> 32SymbolDisplayFormat? format = null) 35format = format ?? SymbolDisplayFormat.CSharpErrorMessageFormat; 43SymbolDisplayFormat? format = null) 51SymbolDisplayFormat? format = null) 54format = format ?? SymbolDisplayFormat.CSharpErrorMessageFormat; 63SymbolDisplayFormat format, 79/// Displays a symbol in the C# style, based on a <see cref="SymbolDisplayFormat"/>. 86/// <param name="format">The formatting options to apply. If null is passed, <see cref="SymbolDisplayFormat.CSharpErrorMessageFormat"/> will be used.</param> 95SymbolDisplayFormat? format = null) 97format ??= SymbolDisplayFormat.MinimallyQualifiedFormat; 107SymbolDisplayFormat? format = null) 117SymbolDisplayFormat? format = null) 119format ??= SymbolDisplayFormat.MinimallyQualifiedFormat; 130/// <param name="format">The formatting options to apply. If null is passed, <see cref="SymbolDisplayFormat.CSharpErrorMessageFormat"/> will be used.</param> 137SymbolDisplayFormat? format = null) 140format = format ?? SymbolDisplayFormat.CSharpErrorMessageFormat; 150SymbolDisplayFormat? format = null) 153format = format ?? SymbolDisplayFormat.CSharpErrorMessageFormat; 161SymbolDisplayFormat? format = null) 164format ??= SymbolDisplayFormat.CSharpErrorMessageFormat; 177/// <param name="format">The formatting options to apply. If null is passed, <see cref="SymbolDisplayFormat.CSharpErrorMessageFormat"/> will be used.</param> 186SymbolDisplayFormat? format = null) 188format ??= SymbolDisplayFormat.MinimallyQualifiedFormat; 199SymbolDisplayFormat? format = null) 201format ??= SymbolDisplayFormat.MinimallyQualifiedFormat; 210SymbolDisplayFormat? format = null) 212format ??= SymbolDisplayFormat.MinimallyQualifiedFormat; 222SymbolDisplayFormat format, 232SymbolDisplayFormat format, 247SymbolDisplayFormat format,
SymbolDisplay\SymbolDisplayVisitor.cs (3)
32SymbolDisplayFormat format, 43SymbolDisplayFormat format, 58protected new void Initialize(ArrayBuilder<SymbolDisplayPart> builder, SymbolDisplayFormat format, bool isFirstSymbolVisited, SemanticModel? semanticModelOpt, int positionOpt, bool inNamespaceOrType)
Symbols\Attributes\AttributeData.cs (1)
139string className = this.AttributeClass.ToDisplayString(SymbolDisplayFormat.TestFormat);
Symbols\NamespaceOrTypeSymbol.cs (1)
272Debug.Assert(!isTopLevel || scope.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat) == emittedTypeName.NamespaceName);
Symbols\NamespaceSymbol.cs (1)
359(_lazyQualifiedName = this.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat));
Symbols\ObsoleteAttributeHelpers.cs (2)
184new FormattedSymbol(symbol, SymbolDisplayFormat.CSharpErrorMessageFormat)); 194new FormattedSymbol(symbol, SymbolDisplayFormat.CSharpErrorMessageFormat));
Symbols\PublicModel\AssemblySymbol.cs (1)
60OrderBy(t => t.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)).AsImmutable();
Symbols\PublicModel\PreprocessingSymbol.cs (4)
78string ISymbol.ToDisplayString(SymbolDisplayFormat? format) 83ImmutableArray<SymbolDisplayPart> ISymbol.ToDisplayParts(SymbolDisplayFormat? format) 88string ISymbol.ToMinimalDisplayString(SemanticModel semanticModel, int position, SymbolDisplayFormat? format) 93ImmutableArray<SymbolDisplayPart> ISymbol.ToMinimalDisplayParts(SemanticModel semanticModel, int position, SymbolDisplayFormat? format)
Symbols\PublicModel\Symbol.cs (4)
164string ISymbol.ToDisplayString(SymbolDisplayFormat format) 169ImmutableArray<SymbolDisplayPart> ISymbol.ToDisplayParts(SymbolDisplayFormat format) 174string ISymbol.ToMinimalDisplayString(SemanticModel semanticModel, int position, SymbolDisplayFormat format) 179ImmutableArray<SymbolDisplayPart> ISymbol.ToMinimalDisplayParts(SemanticModel semanticModel, int position, SymbolDisplayFormat format)
Symbols\PublicModel\TypeSymbol.cs (4)
147string ITypeSymbol.ToDisplayString(CodeAnalysis.NullableFlowState topLevelNullability, SymbolDisplayFormat format) 152ImmutableArray<SymbolDisplayPart> ITypeSymbol.ToDisplayParts(CodeAnalysis.NullableFlowState topLevelNullability, SymbolDisplayFormat format) 157string ITypeSymbol.ToMinimalDisplayString(SemanticModel semanticModel, CodeAnalysis.NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format) 162ImmutableArray<SymbolDisplayPart> ITypeSymbol.ToMinimalDisplayParts(SemanticModel semanticModel, CodeAnalysis.NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format)
Symbols\Retargeting\RetargetingSymbolTranslator.cs (3)
338MetadataTypeName name = MetadataTypeName.FromFullName(type.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat), forcedArity: type.Arity); 430string namespaceName = type.ContainingNamespace.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat); 467string namespaceName = type.ContainingNamespace.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat);
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
69string interfaceName = explicitInterfaceTypeOpt.ToDisplayString(SymbolDisplayFormat.ExplicitInterfaceImplementationFormat);
Symbols\Source\SourceAssemblySymbol.cs (2)
1095y.ToDisplayString(SymbolDisplayFormat.ShortFormat), 2840string fullEmittedName = MetadataHelpers.BuildQualifiedName(originalDefinition.ContainingSymbol.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat),
Symbols\Source\SourceMemberContainerSymbol.cs (2)
278var emittedName = ContainingSymbol.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat); 4572new FormattedSymbol(existingMember, SymbolDisplayFormat.CSharpErrorMessageFormat.WithMemberOptions(SymbolDisplayMemberOptions.IncludeContainingType)),
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (3)
1165new FormattedSymbol(overridingParameter, SymbolDisplayFormat.ShortFormat)); 1228new FormattedSymbol(overridingParameter, SymbolDisplayFormat.ShortFormat)); 1253diagnostics.Add(ErrorCode.WRN_DoesNotReturnMismatch, overrideMethod.GetFirstLocation(), new FormattedSymbol(overrideMethod, SymbolDisplayFormat.MinimallyQualifiedFormat));
Symbols\Source\SourceOrdinaryMethodSymbol.cs (4)
542diagnostics.Add(ErrorCode.ERR_ScopedMismatchInParameterOfPartial, implementingMethod.GetFirstLocation(), new FormattedSymbol(implementingParameter, SymbolDisplayFormat.ShortFormat)); 563diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInParameterTypeOnPartial, implementingMethod.GetFirstLocation(), new FormattedSymbol(implementingParameter, SymbolDisplayFormat.ShortFormat)); 574new FormattedSymbol(definition, SymbolDisplayFormat.MinimallyQualifiedFormat), 575new FormattedSymbol(implementation, SymbolDisplayFormat.MinimallyQualifiedFormat));
Symbols\Source\SourcePropertySymbol.cs (3)
711new FormattedSymbol(this, SymbolDisplayFormat.MinimallyQualifiedFormat), 712new FormattedSymbol(implementation, SymbolDisplayFormat.MinimallyQualifiedFormat)); 763diagnostics.Add(ErrorCode.ERR_ScopedMismatchInParameterOfPartial, implementation.GetFirstLocation(), new FormattedSymbol(implementation.Parameters[i], SymbolDisplayFormat.ShortFormat));
Symbols\Symbol.cs (6)
1009private static readonly SymbolDisplayFormat s_debuggerDisplayFormat = 1010SymbolDisplayFormat.TestFormat 1456public string ToDisplayString(SymbolDisplayFormat format = null) 1461public ImmutableArray<SymbolDisplayPart> ToDisplayParts(SymbolDisplayFormat format = null) 1469SymbolDisplayFormat format = null) 1477SymbolDisplayFormat format = null)
Symbols\SymbolDistinguisher.cs (2)
91string description0 = _symbol0.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat); 92string description1 = _symbol1.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat);
Symbols\Synthesized\SynthesizedLocal.cs (2)
208builder.Append(_type.ToDisplayString(SymbolDisplayFormat.TestFormat)); 228builder.Append(_type.ToDisplayString(SymbolDisplayFormat.TestFormat));
Symbols\TypedConstantExtensions.cs (1)
56string typeName = constant.Type.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat);
Symbols\TypeSymbol.cs (16)
663public string ToDisplayString(CodeAnalysis.NullableFlowState topLevelNullability, SymbolDisplayFormat format = null) 668public ImmutableArray<SymbolDisplayPart> ToDisplayParts(CodeAnalysis.NullableFlowState topLevelNullability, SymbolDisplayFormat format = null) 677SymbolDisplayFormat format = null) 686SymbolDisplayFormat format = null) 1780implementingEvent.GetFirstLocation(), new FormattedSymbol(implementedEvent, SymbolDisplayFormat.MinimallyQualifiedFormat)); 1786new FormattedSymbol(implementingEvent, SymbolDisplayFormat.MinimallyQualifiedFormat), 1787new FormattedSymbol(implementedEvent, SymbolDisplayFormat.MinimallyQualifiedFormat)); 1811implementingMethod.GetFirstLocation(), new FormattedSymbol(implementedMethod.ConstructedFrom, SymbolDisplayFormat.MinimallyQualifiedFormat)); 1819new FormattedSymbol(implementingMethod, SymbolDisplayFormat.MinimallyQualifiedFormat), 1820new FormattedSymbol(implementedMethod.ConstructedFrom, SymbolDisplayFormat.MinimallyQualifiedFormat)); 1833new FormattedSymbol(implementingParameter, SymbolDisplayFormat.ShortFormat), 1834new FormattedSymbol(implementedMethod.ConstructedFrom, SymbolDisplayFormat.MinimallyQualifiedFormat)); 1842new FormattedSymbol(implementingParameter, SymbolDisplayFormat.ShortFormat), 1843new FormattedSymbol(implementingMethod, SymbolDisplayFormat.MinimallyQualifiedFormat), 1844new FormattedSymbol(implementedMethod.ConstructedFrom, SymbolDisplayFormat.MinimallyQualifiedFormat)); 1871new FormattedSymbol(implementingParameter, SymbolDisplayFormat.ShortFormat));
Symbols\TypeSymbolExtensions.cs (1)
1781return string.Equals(container.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat), qualifiedName, comparison);
Symbols\TypeWithAnnotations.cs (4)
65private static readonly SymbolDisplayFormat DebuggerDisplayFormat = new SymbolDisplayFormat( 70internal static readonly SymbolDisplayFormat TestDisplayFormat = new SymbolDisplayFormat( 288public string ToDisplayString(SymbolDisplayFormat format = null) 335return ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
35protected override string ToDisplayString(IMethodSymbol disposeImplMethod, SymbolDisplayFormat format)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
108return (defaultExpression, $"default({type.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)})"); 117return (memberAccess, $"{type.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)}.{memberName}");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamespaceGenerator.cs (1)
178: ParseName(symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Completion\CompletionProviders\DeclarationNameCompletionProviderTests_NameDeclarationInfoTests.cs (1)
778Assert.Equal(typeName, result.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
SymbolKey\SymbolKeyTests.cs (1)
172Assert.Equal("global::ConditionalWeakTableTest<TKey!, TValue!>.CreateValueCallback!", parameterType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier)));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (13)
CodeGen\CodeGenDeconstructTests.cs (10)
6001Assert.Equal("int _", symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6041Assert.Equal("int _", symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6050Assert.Equal("int _", symbolClone.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6094Assert.Equal("List<int> _", symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6144Assert.Equal("double _", symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6150Assert.Equal("int _", symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6257Assert.Equal("int _", symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6307Assert.Equal("long _", model.GetSymbolInfo(discard1).Symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6405Assert.Equal("int _", model.GetSymbolInfo(discard2).Symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6997Assert.Equal("int _", model.GetSymbolInfo(discard3).Symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));
CodeGen\CodeGenTupleTest.cs (2)
27463Assert.Equal(expectedCSharp, CSharp.SymbolDisplay.ToDisplayString(type, SymbolDisplayFormat.TestFormat)); 27464Assert.Equal(expectedVisualBasic, VisualBasic.SymbolDisplay.ToDisplayString(type, SymbolDisplayFormat.TestFormat));
Emit\DeterministicTests.cs (1)
367return getForwardedTypes(assembly).Select(t => t.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (10)
Emit\NumericIntPtrTests.cs (10)
6247Assert.Equal(expectedSymbol, symbolInfo.Symbol?.ToDisplayString(SymbolDisplayFormat.TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes))); 6623Assert.Equal(expectedSymbol, symbolInfo.Symbol?.ToDisplayString(SymbolDisplayFormat.TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes))); 6855Assert.Equal(expectedSymbol, symbolInfo.Symbol?.ToDisplayString(SymbolDisplayFormat.TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes))); 8128Assert.Equal(expectedSymbol, symbolInfo.Symbol?.ToDisplayString(SymbolDisplayFormat.TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes))); 10381Assert.Equal("nint", type.ToDisplayString(SymbolDisplayFormat.TestFormat)); 10382Assert.Equal("System.IntPtr", type.ToDisplayString(SymbolDisplayFormat.TestFormat.WithCompilerInternalOptions(SymbolDisplayCompilerInternalOptions.UseNativeIntegerUnderlyingType))); 10383Assert.Equal("nint", type.ToDisplayString(SymbolDisplayFormat.TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes))); 10390Assert.Equal("nuint", type.ToDisplayString(SymbolDisplayFormat.TestFormat)); 10391Assert.Equal("System.UIntPtr", type.ToDisplayString(SymbolDisplayFormat.TestFormat.WithCompilerInternalOptions(SymbolDisplayCompilerInternalOptions.UseNativeIntegerUnderlyingType))); 10392Assert.Equal("nuint", type.ToDisplayString(SymbolDisplayFormat.TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes)));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (22)
Attributes\AttributeTests_NativeInteger.cs (2)
23private static readonly SymbolDisplayFormat FormatWithSpecialTypes = SymbolDisplayFormat.TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes);
Attributes\AttributeTests_Nullable.cs (2)
4196private static readonly SymbolDisplayFormat _displayFormat = SymbolDisplayFormat.TestFormat.
Attributes\AttributeTests_Tuples.cs (1)
300.Select(s => s.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)));
RefStructInterfacesTests.cs (4)
4383AssertEx.Equal("C<T> where T : allows ref struct", t.ContainingSymbol.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 5099AssertEx.Equal("C<T> where T : new(), allows ref struct", t.ContainingSymbol.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 5123AssertEx.Equal("C<T> where T : new(), allows ref struct", t.ContainingSymbol.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 5770AssertEx.Equal("C<T>", t.ContainingSymbol.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints));
Semantics\OutVarTests.cs (1)
33050Assert.Equal("int _", discard3Symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));
Semantics\RecordTests.cs (12)
3448.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 3479.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 3538.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 3641.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 3744.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 3857.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 3970.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 4082.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 4195.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 4603.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 4706.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 26091SymbolDisplay.ToDisplayString(symbol, SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
Microsoft.CodeAnalysis.CSharp.Features (35)
CodeLens\CSharpCodeLensDisplayInfoService.cs (3)
20private static readonly SymbolDisplayFormat Format = 21SymbolDisplayFormat.CSharpErrorMessageFormat.RemoveMemberOptions( 181private static string GetEnclosingScopeString(SyntaxNode node, SemanticModel semanticModel, SymbolDisplayFormat symbolDisplayFormat)
Completion\CompletionProviders\CrefCompletionProvider.cs (5)
34private static readonly SymbolDisplayFormat QualifiedCrefFormat = 43private static readonly SymbolDisplayFormat CrefFormat = 46private static readonly SymbolDisplayFormat MinimalParameterTypeFormat = 47SymbolDisplayFormat.MinimallyQualifiedFormat.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.ExpandValueTuple); 284SymbolDisplayFormat unqualifiedCrefFormat)
Completion\CompletionProviders\PartialTypeCompletionProvider.cs (2)
30private static readonly SymbolDisplayFormat _symbolFormatWithGenerics = 40private static readonly SymbolDisplayFormat _symbolFormatWithoutGenerics =
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
29private static readonly SymbolDisplayFormat s_format =
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (2)
1602protected override SymbolDisplayFormat ErrorDisplayFormat => SymbolDisplayFormat.CSharpErrorMessageFormat;
GenerateConstructorFromMembers\CSharpGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
47protected override string ToDisplayString(IParameterSymbol parameter, SymbolDisplayFormat format)
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (1)
31private static readonly SymbolDisplayFormat NameAndTypeParametersFormat =
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (9)
27private static readonly SymbolDisplayFormat s_minimallyQualifiedFormat = SymbolDisplayFormat.MinimallyQualifiedFormat 33private static readonly SymbolDisplayFormat s_minimallyQualifiedFormatWithConstants = s_minimallyQualifiedFormat 38private static readonly SymbolDisplayFormat s_minimallyQualifiedFormatWithConstantsAndModifiers = s_minimallyQualifiedFormatWithConstants 105protected override ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat format) 109=> symbol == null ? null : CodeAnalysis.CSharp.SymbolDisplay.ToDisplayString(symbol, SymbolDisplayFormat.MinimallyQualifiedFormat); 206protected override SymbolDisplayFormat MinimallyQualifiedFormat => s_minimallyQualifiedFormat; 208protected override SymbolDisplayFormat MinimallyQualifiedFormatWithConstants => s_minimallyQualifiedFormatWithConstants; 210protected override SymbolDisplayFormat MinimallyQualifiedFormatWithConstantsAndModifiers => s_minimallyQualifiedFormatWithConstantsAndModifiers;
NavigationBar\CSharpNavigationBarItemService.cs (3)
26private static readonly SymbolDisplayFormat s_typeFormat = 27SymbolDisplayFormat.CSharpErrorMessageFormat.AddGenericsOptions(SymbolDisplayGenericsOptions.IncludeVariance); 29private static readonly SymbolDisplayFormat s_memberFormat =
SignatureHelp\AbstractCSharpSignatureHelpProvider.cs (2)
15private static readonly SymbolDisplayFormat s_allowDefaultLiteralFormat = SymbolDisplayFormat.MinimallyQualifiedFormat
SignatureHelp\GenericNameSignatureHelpProvider.cs (3)
207private static readonly SymbolDisplayFormat s_minimallyQualifiedFormat = 208SymbolDisplayFormat.MinimallyQualifiedFormat.WithGenericsOptions( 209SymbolDisplayFormat.MinimallyQualifiedFormat.GenericsOptions | SymbolDisplayGenericsOptions.IncludeVariance);
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
35protected override string ToDisplayString(IMethodSymbol disposeImplMethod, SymbolDisplayFormat format)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
108return (defaultExpression, $"default({type.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)})"); 117return (memberAccess, $"{type.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)}.{memberName}");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (231)
Semantics\NativeIntegerTests.cs (6)
116Assert.Equal("Sub I.F1(x As System.IntPtr, y As System.IntPtr)", VisualBasic.SymbolDisplay.ToDisplayString(method.GetPublicSymbol(), SymbolDisplayFormat.TestFormat)); 121Assert.Equal("Sub I.F2(x As System.UIntPtr, y As System.UIntPtr)", VisualBasic.SymbolDisplay.ToDisplayString(method.GetPublicSymbol(), SymbolDisplayFormat.TestFormat)); 9732Assert.Equal(expectedSymbol, symbolInfo.Symbol?.ToDisplayString(SymbolDisplayFormat.TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes))); 10109Assert.Equal(expectedSymbol, symbolInfo.Symbol?.ToDisplayString(SymbolDisplayFormat.TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes))); 10334Assert.Equal(expectedSymbol, symbolInfo.Symbol?.ToDisplayString(SymbolDisplayFormat.TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes))); 12383Assert.Equal(expectedSymbol, symbolInfo.Symbol?.ToDisplayString(SymbolDisplayFormat.TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes)));
Semantics\NullableReferenceTypesTests.cs (221)
71785Assert.Equal("object _", discard1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 71789Assert.Equal("object? _", discard2.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 71793Assert.Equal("C<object> _", discard3.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 71797Assert.Equal("C<object?> _", discard4.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 71801Assert.Equal("C<object> _", discard5.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 71938Assert.Equal("object _", model.GetSymbolInfo(discard2).Symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 97650Assert.Equal("void B.F1<T1>(T1? t1) where T1 : class!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97656Assert.Equal("void B.F2<T2>(T2 t2) where T2 : class?", f2.ToDisplayString(SymbolDisplayFormat.TestFormat.WithGenericsOptions(SymbolDisplayFormat.TestFormat.GenericsOptions | SymbolDisplayGenericsOptions.IncludeTypeConstraints))); 97657Assert.Equal("void B.F2<T2>(T2 t2) where T2 : class", f2.ToDisplayString(SymbolDisplayFormat.TestFormat.WithGenericsOptions(SymbolDisplayFormat.TestFormat.GenericsOptions | SymbolDisplayGenericsOptions.IncludeTypeConstraints). 97658WithMiscellaneousOptions(SymbolDisplayFormat.TestFormatWithConstraints.MiscellaneousOptions & 97701Assert.Equal("A<T1> where T1 : class!", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97714Assert.Equal("B<T2> where T2 : class?", b.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97761Assert.Equal("void F1<T1>(T1? t1) where T1 : class!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97767Assert.Equal("void F2<T2>(T2 t2) where T2 : class?", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97808Assert.Equal("B<T1> where T1 : class?", b.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97821Assert.Equal("void B<T1>.F2<T2>(T2 t2) where T2 : class?", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98419Assert.Equal("void B.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98433Assert.Equal("void B.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98486Assert.Equal("void B.F1<T11>(T11? t1)", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98493Assert.Equal("void B.F2<T22>(T22 t2) where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98499Assert.Equal("void A<System.Int32>.F2<T2>(T2 t2) where T2 : class?", af2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98610Assert.Equal("void B.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98624Assert.Equal("void B.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98639Assert.Equal("void B.F3<T33>() where T33 : C1<C2?>!", bf3.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98642Assert.Equal("void B.F4<T44>() where T44 : C1<C2!>?", bf4.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98717Assert.Equal("void B.IA.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98731Assert.Equal("void B.IA.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98783Assert.Equal("void B.IA.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98797Assert.Equal("void B.IA.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98864Assert.Equal("void B.IA.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98870Assert.Equal("void B.IA.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98924Assert.Equal("void B.IA.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98938Assert.Equal("void B.IA.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98983Assert.Equal("void B.IA.F1<T11>(T11? t1) where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98988Assert.Equal("void B.IA.F2<T22>(T22 t2) where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99014Assert.Equal("void B.F2<T2>() where T2 : class?", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99047Assert.Equal("B<T2> where T2 : class?", b.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99090Assert.Equal("void F2<T2>() where T2 : class?", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99298Assert.Equal("void B.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99312Assert.Equal("void B.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99327Assert.Equal("void B.F3<T33>() where T33 : C1<C2?>!", bf3.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99330Assert.Equal("void B.F4<T44>() where T44 : C1<C2!>?", bf4.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100292Assert.Equal("void B.F1<T1>() where T1 : notnull", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100330Assert.Equal("void B.F1<T1>() where T1 : notnull", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100382Assert.Equal("void B.F1<T1>(T1? t1)", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100389Assert.Equal("void B.F2<T2>(T2? t2)", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100421Assert.Equal("void B.F1<T1>() where T1 : notnull", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100441Assert.Equal("void B.F1<T1>() where T1 : notnull", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100496Assert.Equal("void B.F1<T1>(T1? t1) where T1 : struct", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100504Assert.Equal("void B.F2<T2>(T2? t2) where T2 : struct", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100540Assert.Equal("void B.F1<T1>(T1? t1) where T1 : class!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100547Assert.Equal("void B.F2<T2>(T2? t2) where T2 : class!", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100585Assert.Equal("void B.F1<T1>(T1? t1) where T1 : class?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100592Assert.Equal("void B.F2<T2>(T2? t2) where T2 : class?", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100624Assert.Equal("void B.F1<T1>(T1? t1) where T1 : class?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100667Assert.Equal("void A.I<System.Object!>.F1<TF1A>(TF1A x) where TF1A : System.Object!", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100671Assert.Equal("void A.I<System.Object>.F1<TF1A>(TF1A x) where TF1A : System.Object!", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100682Assert.Equal("void I<System.Object!>.F1<TF1>(TF1 x) where TF1 : System.Object!", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100688Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x)", impl.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100697Assert.Equal("void B.I<System.Object?>.F1<TF1B>(TF1B x)", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100701Assert.Equal("void B.I<System.Object>.F1<TF1B>(TF1B x)", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100711Assert.Equal("void I<System.Object?>.F1<TF1>(TF1 x)", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100719Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x)", impl.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100762Assert.Equal("void A.I<A!>.F1<TF1A>(TF1A! x) where TF1A : A!", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100766Assert.Equal("void A.I<A>.F1<TF1A>(TF1A! x) where TF1A : A!", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100777Assert.Equal("void I<A!>.F1<TF1>(TF1 x) where TF1 : A!", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100782Assert.Equal("void I<A>.F1<TF1>(TF1 x) where TF1 : A", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100790Assert.Equal("void B.I<A?>.F1<TF1B>(TF1B x) where TF1B : A?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100794Assert.Equal("void B.I<A>.F1<TF1B>(TF1B x) where TF1B : A?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100804Assert.Equal("void I<A?>.F1<TF1>(TF1 x) where TF1 : A?", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100809Assert.Equal("void I<A>.F1<TF1>(TF1 x) where TF1 : A", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100851Assert.Equal("void A.I<System.Object!>.F1<TF1A>(TF1A! x) where TF1A : class?, System.Object!", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100855Assert.Equal("void A.I<System.Object>.F1<TF1A>(TF1A! x) where TF1A : class?, System.Object!", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100864Assert.Equal("void I<System.Object!>.F1<TF1>(TF1 x) where TF1 : class?, System.Object!", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100868Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x) where TF1 : class?, System.Object", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100876Assert.Equal("void B.I<System.Object?>.F1<TF1B>(TF1B x) where TF1B : class?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100880Assert.Equal("void B.I<System.Object>.F1<TF1B>(TF1B x) where TF1B : class?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100888Assert.Equal("void I<System.Object?>.F1<TF1>(TF1 x) where TF1 : class?", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100892Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x) where TF1 : class?, System.Object", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100918Assert.Equal("void B.F1<T1>(T1? t1) where T1 : notnull, B!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100942Assert.Equal("void B.F1<T1>(T1? t1) where T1 : notnull, B?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100967Assert.Equal("void B.F1<T1>(T1? t1) where T1 : notnull, B!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100994Assert.Equal("void B.F1<T1>(T1? t1) where T1 : B!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101037Assert.Equal("void A.I<System.Object!>.F1<TF1A>(TF1A! x) where TF1A : System.Object!, B?", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101041Assert.Equal("void A.I<System.Object>.F1<TF1A>(TF1A! x) where TF1A : System.Object!, B?", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101050Assert.Equal("void I<System.Object!>.F1<TF1>(TF1 x) where TF1 : System.Object!, B?", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101054Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x) where TF1 : System.Object, B?", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101062Assert.Equal("void B.I<System.Object?>.F1<TF1B>(TF1B x) where TF1B : B?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101066Assert.Equal("void B.I<System.Object>.F1<TF1B>(TF1B x) where TF1B : B?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101074Assert.Equal("void I<System.Object?>.F1<TF1>(TF1 x) where TF1 : B?", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101078Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x) where TF1 : System.Object, B?", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101119Assert.Equal("void A.I<System.Object!, B?>.F1<TF1A>(TF1A! x) where TF1A : System.Object!, B?", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101123Assert.Equal("void A.I<System.Object, B>.F1<TF1A>(TF1A! x) where TF1A : System.Object!, B?", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101132Assert.Equal("void I<System.Object!, B?>.F1<TF1>(TF1 x) where TF1 : System.Object!, B?", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101136Assert.Equal("void I<System.Object, B>.F1<TF1>(TF1 x) where TF1 : B", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101144Assert.Equal("void B.I<System.Object?, B?>.F1<TF1B>(TF1B x) where TF1B : B?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101148Assert.Equal("void B.I<System.Object, B>.F1<TF1B>(TF1B x) where TF1B : B?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101156Assert.Equal("void I<System.Object?, B?>.F1<TF1>(TF1 x) where TF1 : B?", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101160Assert.Equal("void I<System.Object, B>.F1<TF1>(TF1 x) where TF1 : B", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101926Assert.Equal("void I1.F1<TF1>()", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101949Assert.Equal("void I1.F1<TF1, TF2>() where TF2 : class", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101978Assert.Equal("void I1.F1<TF1>() where TF1 : new()", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102005Assert.Equal("void I1.F1<TF1>() where TF1 : class", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102032Assert.Equal("void I1.F1<TF1>() where TF1 : struct", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102059Assert.Equal("void I1.F1<TF1>() where TF1 : unmanaged", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102086Assert.Equal("void I1.F1<TF1>() where TF1 : I1", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102128Assert.Equal("void I1.F1<TF1>() where TF1 : class?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102159Assert.Equal("void I1.F1<TF1>() where TF1 : I1?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102197Assert.Equal("void I1.F1<TF1>()", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102231Assert.Equal("void I1.F1<TF1, TF2>() where TF1 : class?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102271Assert.Equal("void I1.F1<TF1>() where TF1 : new()", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102309Assert.Equal("void I1.F1<TF1>() where TF1 : class!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102336Assert.Equal("void I1.F1<TF1>() where TF1 : struct", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102364Assert.Equal("void I1.F1<TF1>() where TF1 : unmanaged", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102392Assert.Equal("void I1.F1<TF1>() where TF1 : I1!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102431Assert.Equal("void I1.F1<TF1>() where TF1 : class?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102459Assert.Equal("void I1.F1<TF1>() where TF1 : I1?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102486Assert.Equal("I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102508Assert.Equal("I1<TF1, TF2> where TF2 : class", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102536Assert.Equal("I1<TF1> where TF1 : new()", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102562Assert.Equal("I1<TF1> where TF1 : class", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102588Assert.Equal("I1<TF1> where TF1 : struct", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102614Assert.Equal("I1<TF1> where TF1 : unmanaged", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102640Assert.Equal("I1<TF1> where TF1 : I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102672Assert.Equal("I1<TF1> where TF1 : class?", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102711Assert.Equal("I1<TF1> where TF1 : I1<TF1>?", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102739Assert.Equal("I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102772Assert.Equal("I1<TF1, TF2> where TF1 : class?", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102811Assert.Equal("I1<TF1> where TF1 : new()", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102848Assert.Equal("I1<TF1> where TF1 : class!", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102883Assert.Equal("I1<TF1> where TF1 : struct", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102910Assert.Equal("I1<TF1> where TF1 : unmanaged", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102937Assert.Equal("I1<TF1> where TF1 : I1<TF1>!", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 102966Assert.Equal("I1<TF1> where TF1 : class?", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103001Assert.Equal("I1<TF1> where TF1 : I1<TF1>?", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103033Assert.Equal("I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103066Assert.Equal("I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103109Assert.Equal("I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103153Assert.Equal("I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104809Assert.Equal("void B.F1<T11>(T11? t1) where T11 : class", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104822Assert.Equal("void A<System.Int32>.F1<T1>(T1? t1) where T1 : class", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104835Assert.Equal("void B.F2<T22>(T22 t2) where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104849Assert.Equal("void A<System.Int32>.F2<T2>(T2 t2) where T2 : class?", af2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104913Assert.Equal("void B.F1<T11>(T11? t1) where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104919Assert.Equal("void B.F2<T22>(T22 t2) where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104990Assert.Equal("void B.F1<T11>(T11? t1) where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104996Assert.Equal("void B.F2<T22>(T22 t2) where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105041Assert.Equal("void B<S>.F1<T1>(T1 t1)", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105044Assert.Equal("void B<S>.F2<T2>(T2 t2)", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105088Assert.Equal("void Test2.M1<S>() where S : System.Object!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105092Assert.Equal("void Test1<dynamic!>.M1<S>() where S : System.Object!", baseM1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105132Assert.Equal("void Test2.M1<S>()", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105136Assert.Equal("void Test1<dynamic>.M1<S>()", baseM1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105181Assert.Equal("void Test2.M1<S>() where S : Test1<System.Object!>!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105185Assert.Equal("void Test1<Test1<dynamic!>!>.M1<S>() where S : Test1<System.Object!>!", baseM1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105217Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105221Assert.Equal("void Test1<dynamic!>.M1<S>(S x) where S : System.Object!, I1?", baseM1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106158Assert.Equal("void Test2.M1<S>(S x)", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106189Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106220Assert.Equal("void Test2.M1<S>(S x)", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106252Assert.Equal("void Test2.M1<S>(S x) where S : I1", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106285Assert.Equal("void Test2.M1<S>(S x) where S : System.Object, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106318Assert.Equal("void Test2.M1<S>(S x) where S : I1!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106350Assert.Equal("void Test2.M1<S>(S x) where S : I1!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106382Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106415Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106445Assert.Equal("void Test2.M1<S>(S x) where S : class", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106476Assert.Equal("void Test2.M1<S>(S x) where S : class?, System.Object", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106507Assert.Equal("void Test2.M1<S>(S x) where S : class!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106539Assert.Equal("void Test2.M1<S>(S! x) where S : class!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106571Assert.Equal("void Test2.M1<S>(S! x) where S : class?, System.Object!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106604Assert.Equal("void Test2.M1<S>(S! x) where S : class, System.Object!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106635Assert.Equal("void Test2.M1<S>(S x) where S : notnull", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106667Assert.Equal("void Test2.M1<S>(S x) where S : notnull", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106698Assert.Equal("void Test2.M1<S>(S x) where S : struct", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106730Assert.Equal("void Test2.M1<S>(S x) where S : struct", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106760Assert.Equal("void Test2.M1<S>(S x) where S : System.Int32", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106790Assert.Equal("void Test2.M1<S>(S x) where S : System.Int32", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106820Assert.Equal("void Test2.M1<S>(S x) where S : System.Object, System.Int32?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106850Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, System.Int32?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107040Assert.Equal("void Test2.M1<S>(S x)", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107044Assert.Equal("void Test2.M2<S>(S x) where S : I1", m2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107048Assert.Equal("void Test2.M3<S>(S x) where S : class", m3.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107052Assert.Equal("void Test2.M4<S>(S x) where S : class?, System.Object", m4.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107056Assert.Equal("void Test2.M5<S>(S x) where S : class!", m5.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107060Assert.Equal("void Test2.M6<S>(S x) where S : notnull", m6.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107064Assert.Equal("void Test2.M7<S>(S x)", m7.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107068Assert.Equal("void Test2.M8<S>(S x) where S : struct", m8.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107072Assert.Equal("void Test2.M9<S>(S x) where S : System.Int32", m9.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107076Assert.Equal("void Test2.M10<S>(S x) where S : System.Object, System.Int32?", m10.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107111Assert.Equal("void Test2.M1<S, U>(S x) where S : System.Object", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107146Assert.Equal("void Test2.M1<S, U>(S x) where S : System.Object, U", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107177Assert.Equal("void Test2.M1<S>(S x) where S : class?, System.Object", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107214Assert.Equal("void Test2.M1<S>(S x) where S : System.Object, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107250Assert.Equal("void Test2.M1<S>(S x) where S : System.Object, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107287Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107323Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107361Assert.Equal("void Test2<T>.M1<S>(S x) where S : T", t2m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107365Assert.Equal("void Test3.M1<S>(S x) where S : System.Object, Test3?", t3m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107408Assert.Equal("void Test3.M1<S>(S x) where S : System.Object, Test3?", t3m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107446Assert.Equal("void Test2<T>.M1<S>(S x) where S : T", t2m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107450Assert.Equal("void Test3.M1<S>(S x) where S : System.Int32", t3m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107487Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107523Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107560Assert.Equal("void Test2.M1<S>(S! x) where S : I1?, System.String!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107596Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107632Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107668Assert.Equal("void Test2.M1<S>(S! x) where S : I1?, System.String!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 107704Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 108274Assert.Equal("void B.M1<TM1>(TM1 x) where TM1 : class", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 111009Assert.Equal("C<T, U> where T : class! where U : T?", c.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 113650Assert.Equal("A<T> where T : class!", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier))); 113669Assert.Equal("A<T> where T : class", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier))); 113693Assert.Equal("A<T> where T : class?", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier))); 113694Assert.Equal("A<T> where T : class", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier))); 113715Assert.Equal("A<T> where T : class?", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier))); 113716Assert.Equal("A<T> where T : class", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier))); 113748Assert.Equal("A<T> where T : unmanaged!", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier))); 113769Assert.Equal("A<T> where T : unmanaged", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier)));
Semantics\RecordStructTests.cs (2)
403Assert.Equal("record struct Point", point.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 410Assert.Equal("struct Point", point.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
Semantics\RefFieldTests.cs (2)
11988private static readonly SymbolDisplayFormat displayFormatWithScoped = SymbolDisplayFormat.TestFormat.
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (322)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (15)
4695Assert.Equal("A<object>.B<?>", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4710Assert.Equal("A<?, ?, ?>.B<object>", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4725Assert.Equal("A<?>.B<?>", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4800Assert.Equal("(int, int)", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4823Assert.Equal("(int Alice, int Bob)", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4846Assert.Equal("(short, int)", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4869Assert.Equal("(short, string)", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4892Assert.Equal("(short Alice, string Bob)", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4915Assert.Equal("(int Alice, int Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4938Assert.Equal("(int Alice, short Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4961Assert.Equal("(short Alice, string Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4996Assert.Equal("(short Alice, string Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 5042Assert.Equal("(short Alice, string Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 5091Assert.Equal("(short Alice, string Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 5114Assert.Equal("(short, string Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat));
SymbolDisplay\SymbolDisplayTests.cs (244)
32var format = new SymbolDisplayFormat( 51var format = new SymbolDisplayFormat( 79var format = new SymbolDisplayFormat( 107var format = new SymbolDisplayFormat( 138SymbolDisplayFormat.FullyQualifiedFormat, 155var format = new SymbolDisplayFormat( 183var format = new SymbolDisplayFormat( 208var format = new SymbolDisplayFormat(); 237var format = new SymbolDisplayFormat(); 259var format = new SymbolDisplayFormat( 297var format = new SymbolDisplayFormat( 342var format = new SymbolDisplayFormat( 407var format = new SymbolDisplayFormat( 463var format = new SymbolDisplayFormat( 531var format = new SymbolDisplayFormat( 596var format = new SymbolDisplayFormat( 652var format = new SymbolDisplayFormat( 701var format = new SymbolDisplayFormat( 739SymbolDisplayFormat format = null; 763var format = new SymbolDisplayFormat( 801var format = new SymbolDisplayFormat( 834var format = new SymbolDisplayFormat( 873var format = new SymbolDisplayFormat( 908var format = new SymbolDisplayFormat( 943var format = new SymbolDisplayFormat( 978var format = new SymbolDisplayFormat( 1013var format = new SymbolDisplayFormat( 1067var format = new SymbolDisplayFormat( 1108var format = new SymbolDisplayFormat( 1154var format = new SymbolDisplayFormat( 1183var format = new SymbolDisplayFormat( 1215var format = new SymbolDisplayFormat( 1258var format = new SymbolDisplayFormat( 1283var format = new SymbolDisplayFormat( 1310var format = new SymbolDisplayFormat( 1335var format = new SymbolDisplayFormat( 1359var format = new SymbolDisplayFormat( 1383var format = new SymbolDisplayFormat( 1409var format = new SymbolDisplayFormat( 1449var format = new SymbolDisplayFormat( 1471var format = new SymbolDisplayFormat( 1496var format = new SymbolDisplayFormat( 1523var format = new SymbolDisplayFormat( 1551var format = new SymbolDisplayFormat( 1579var format = new SymbolDisplayFormat( 1606var format = new SymbolDisplayFormat( 1636var format = new SymbolDisplayFormat( 1673var format = new SymbolDisplayFormat( 1713var format = new SymbolDisplayFormat( 1745var format = new SymbolDisplayFormat( 1777var format = new SymbolDisplayFormat( 1820var format = new SymbolDisplayFormat( 1843var format = new SymbolDisplayFormat( 1880var format = new SymbolDisplayFormat( 1903var format = new SymbolDisplayFormat( 1938var format = new SymbolDisplayFormat( 1961var format = new SymbolDisplayFormat( 1996var format = new SymbolDisplayFormat( 2064var format = new SymbolDisplayFormat( 2101var format = new SymbolDisplayFormat( 2143var format = new SymbolDisplayFormat( 2196var format = new SymbolDisplayFormat( 2231var format = new SymbolDisplayFormat( 2268var format = new SymbolDisplayFormat( 2305var format = new SymbolDisplayFormat( 2331var format = new SymbolDisplayFormat( 2361var format = new SymbolDisplayFormat( 2389var format = new SymbolDisplayFormat( 2480var format = new SymbolDisplayFormat( 2541var format = new SymbolDisplayFormat( 2585var format = new SymbolDisplayFormat( 2633var format = new SymbolDisplayFormat( 2666var format = new SymbolDisplayFormat( 2697var format = new SymbolDisplayFormat( 2731var format = new SymbolDisplayFormat( 2762var format = SymbolDisplayFormat.MinimallyQualifiedFormat; 2790var format = new SymbolDisplayFormat(); 2990private static readonly SymbolDisplayFormat s_memberSignatureDisplayFormat = 3102var format = SymbolDisplayFormat.MinimallyQualifiedFormat; 3132var format = new SymbolDisplayFormat( 3261var format = new SymbolDisplayFormat( 3322var format = new SymbolDisplayFormat( 3383var format = new SymbolDisplayFormat( 3410SymbolDisplayFormat format, 3432SymbolDisplayFormat format, 3442SymbolDisplayFormat format, 3472var format = new SymbolDisplayFormat(globalNamespaceStyle: SymbolDisplayFormat.CSharpErrorMessageFormat.GlobalNamespaceStyle, 3473typeQualificationStyle: SymbolDisplayFormat.CSharpErrorMessageFormat.TypeQualificationStyle, 3474genericsOptions: SymbolDisplayFormat.CSharpErrorMessageFormat.GenericsOptions, 3475memberOptions: SymbolDisplayFormat.CSharpErrorMessageFormat.MemberOptions, 3476parameterOptions: SymbolDisplayFormat.CSharpErrorMessageFormat.ParameterOptions, 3477propertyStyle: SymbolDisplayFormat.CSharpErrorMessageFormat.PropertyStyle, 3478localOptions: SymbolDisplayFormat.CSharpErrorMessageFormat.LocalOptions, 3481miscellaneousOptions: SymbolDisplayFormat.CSharpErrorMessageFormat.MiscellaneousOptions); 3493miscellaneousOptions: SymbolDisplayFormat.CSharpErrorMessageFormat.MiscellaneousOptions); 3526var format = 3580var format = 3632var format = 3680var format = 3761var format = 3835var format = 3947var format = 4057var format = 4161var format = 4266var format = new SymbolDisplayFormat( 4310var format = new SymbolDisplayFormat( 4357var format = new SymbolDisplayFormat( 4399var format = new SymbolDisplayFormat( 4434var format = new SymbolDisplayFormat( 4482var format = new SymbolDisplayFormat( 4523var format = new SymbolDisplayFormat( 4592var normalFormat = new SymbolDisplayFormat(); 4593var reverseFormat = new SymbolDisplayFormat( 4668var format = new SymbolDisplayFormat( 4702var format = new SymbolDisplayFormat( 4756var memberFormat = new SymbolDisplayFormat( 4760var typeFormat = new SymbolDisplayFormat( 4764var namespaceFormat = new SymbolDisplayFormat( 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)); 4913Assert.Null(SymbolDisplay.FormatPrimitive(SymbolDisplayFormat.TestFormat, quoteStrings: false, useHexadecimalNumbers: false)); 4946var memberFormat = new SymbolDisplayFormat( 5112var format = new SymbolDisplayFormat( 5141var f1 = new SymbolDisplayFormat(); 5142var f2 = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeParameters); 5174var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType); 5206var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, miscellaneousOptions: SymbolDisplayMiscellaneousOptions.CollapseTupleTypes); 5237var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, 5268var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType); 5305var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, 5356var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, 5402var format = new SymbolDisplayFormat( 5419SymbolDisplay.ToDisplayParts(symbol, SymbolDisplayFormat.MinimallyQualifiedFormat), 5457SymbolDisplay.ToDisplayParts(model.GetSymbolInfo(actualThis).Symbol, SymbolDisplayFormat.MinimallyQualifiedFormat), 5467SymbolDisplay.ToDisplayParts(model.GetSymbolInfo(escapedThis).Symbol, SymbolDisplayFormat.MinimallyQualifiedFormat), 5501var formatBase = new SymbolDisplayFormat( 5507var formatWithoutRef = formatBase.WithMemberOptions( 5509var formatWithRef = formatBase.WithMemberOptions( 5511var formatWithoutTypeWithRef = formatBase.WithMemberOptions( 5705var formatBase = new SymbolDisplayFormat( 5711var formatWithoutRef = formatBase.WithMemberOptions( 5713var formatWithRef = formatBase.WithMemberOptions( 5715var formatWithoutTypeWithRef = formatBase.WithMemberOptions( 5904var description = symbol.ToMinimalDisplayParts(model, position, SymbolDisplayFormat.MinimallyQualifiedFormat); 5922var formatWithoutNonNullableModifier = new SymbolDisplayFormat( 5928var formatWithNonNullableModifier = formatWithoutNonNullableModifier 5994var formatWithoutNullableModifier = new SymbolDisplayFormat( 6000var formatWithNullableModifier = formatWithoutNullableModifier 6063var formatWithoutModifiers = new SymbolDisplayFormat( 6066var formatWithNullableModifier = formatWithoutModifiers.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier); 6067var formatWithBothModifiers = formatWithNullableModifier.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier); 6149var formatWithoutAllowDefaultLiteral = SymbolDisplayFormat.MinimallyQualifiedFormat; 6151var formatWithAllowDefaultLiteral = formatWithoutAllowDefaultLiteral.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.AllowDefaultLiteral); 6182var formatWithoutModifiers = new SymbolDisplayFormat( 6187var formatWithNullableModifier = formatWithoutModifiers.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier); 6188var formatWithBothModifiers = formatWithNullableModifier.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier); 6221var format = new SymbolDisplayFormat( 6276var formatWithoutAllowDefaultLiteral = SymbolDisplayFormat.MinimallyQualifiedFormat; 6278var formatWithAllowDefaultLiteral = formatWithoutAllowDefaultLiteral.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.AllowDefaultLiteral); 6320var formatWithoutAllowDefaultLiteral = SymbolDisplayFormat.MinimallyQualifiedFormat; 6322var formatWithAllowDefaultLiteral = formatWithoutAllowDefaultLiteral.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.AllowDefaultLiteral); 6344var formatWithoutLongHandValueTuple = new SymbolDisplayFormat( 6350var formatWithLongHandValueTuple = formatWithoutLongHandValueTuple.AddMiscellaneousOptions( 6444Verify(localSymbol.ToDisplayParts(SymbolDisplayFormat.TestFormat), 6457SymbolDisplayFormat changeSignatureFormat = new SymbolDisplayFormat( 6522Verify(localSymbol.ToDisplayParts(SymbolDisplayFormat.TestFormat), 6583SymbolDisplayFormat.MinimallyQualifiedFormat), 6616Verify(localSymbol.ToDisplayParts(SymbolDisplayFormat.TestFormat), 6677SymbolDisplayFormat.MinimallyQualifiedFormat.AddLocalOptions(SymbolDisplayLocalOptions.IncludeRef)), 6710SymbolDisplayFormat.MinimallyQualifiedFormat.AddLocalOptions(SymbolDisplayLocalOptions.IncludeRef)), 6722SymbolDisplayFormat.MinimallyQualifiedFormat), 6755SymbolDisplayFormat.MinimallyQualifiedFormat.AddLocalOptions(SymbolDisplayLocalOptions.IncludeRef)), 6769SymbolDisplayFormat.MinimallyQualifiedFormat), 6841SymbolDisplayFormat.MinimallyQualifiedFormat 6870var format = SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword); 6908var format = SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword); 6946var format = SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword); 6983var format = SymbolDisplayFormat.TestFormat 7068var format = SymbolDisplayFormat.TestFormat 7328var format = SymbolDisplayFormat.TestFormat 7481var format = SymbolDisplayFormat.TestFormat 7517var format = SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword); 7532SymbolDisplayFormat.TestFormat.WithGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeParameters | SymbolDisplayGenericsOptions.IncludeTypeConstraints), 7556SymbolDisplayFormat.TestFormat, 7569SymbolDisplayFormat.TestFormat.WithGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeParameters | SymbolDisplayGenericsOptions.IncludeTypeConstraints), 7593SymbolDisplayFormat.TestFormat, 7606SymbolDisplayFormat.TestFormat.WithGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeParameters | SymbolDisplayGenericsOptions.IncludeTypeConstraints), 7630SymbolDisplayFormat.TestFormat, 7643SymbolDisplayFormat.TestFormat.AddGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeConstraints), 7668SymbolDisplayFormat.TestFormat.AddGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeConstraints), 7701SymbolDisplayFormat.TestFormat.AddGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeConstraints), 7817var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType); 7867var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType); 7957var formatWithoutOptions = new SymbolDisplayFormat( 7961var formatWithUnderlyingTypes = formatWithoutOptions.WithCompilerInternalOptions(SymbolDisplayCompilerInternalOptions.UseNativeIntegerUnderlyingType); 8037var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword); 8058var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword); 8079var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword); 8102var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword); 8131var format = new SymbolDisplayFormat(); 8152var format = new SymbolDisplayFormat(); 8173var format = new SymbolDisplayFormat(); 8194var format = new SymbolDisplayFormat(); 8203private static readonly SymbolDisplayFormat s_fullDelegateFormat = new SymbolDisplayFormat( 8374var format = s_memberSignatureDisplayFormat.RemoveParameterOptions(SymbolDisplayParameterOptions.IncludeName); 8388Verify(methodSymbol.ToDisplayParts(SymbolDisplayFormat.CSharpErrorMessageFormat), "C.M(ref int)", 8398Verify(methodSymbol.ToDisplayParts(SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat), "C.M(ref int)", 8415Verify(parameterSymbol.ToDisplayParts(SymbolDisplayFormat.CSharpErrorMessageFormat), "ref int p", 8422Verify(parameterSymbol.ToDisplayParts(SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat), "ref int", 8483Verify(comp.GetMember<FieldSymbol>("S.F1").ToDisplayParts(SymbolDisplayFormat.TestFormat), 8496Verify(comp.GetMember<FieldSymbol>("S.F2").ToDisplayParts(SymbolDisplayFormat.TestFormat), 8526var formatTypeOnly = SymbolDisplayFormat.TestFormat.WithParameterOptions(SymbolDisplayParameterOptions.IncludeType | SymbolDisplayParameterOptions.IncludeName); 8527var formatTypeRefAndScoped = formatTypeOnly.AddParameterOptions(SymbolDisplayParameterOptions.IncludeParamsRefOut); 8610var formatTypeOnly = s_fullDelegateFormat.WithParameterOptions(SymbolDisplayParameterOptions.IncludeType | SymbolDisplayParameterOptions.IncludeName); 8611var formatTypeRefAndScoped = formatTypeOnly.AddParameterOptions(SymbolDisplayParameterOptions.IncludeParamsRefOut); 8649var formatMinimal = new SymbolDisplayFormat(); 8650var formatTypeRefAndScoped = s_fullDelegateFormat. 8675var format = SymbolDisplayFormat.TestFormat. 8706var formatTypeOnly = SymbolDisplayFormat.TestFormat.WithLocalOptions(SymbolDisplayLocalOptions.IncludeType); 8707var formatTypeRefAndScoped = formatTypeOnly.AddLocalOptions(SymbolDisplayLocalOptions.IncludeRef); 8763Verify(op.ToDisplayParts(SymbolDisplayFormat.TestFormat), 8789var ideFormat = new SymbolDisplayFormat(
Symbols\CompilationCreationTests.cs (4)
2414Assert.Equal(typeC301.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat), 2416GetTypeMembers("C301").Single().ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)); 2418Assert.Equal(typeC6.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat), 2419asm3.GlobalNamespace.GetTypeMembers("C6").Single().ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat));
Symbols\CorLibrary\CorTypes.cs (1)
23private static readonly SymbolDisplayFormat s_languageNameFormat = new SymbolDisplayFormat(
Symbols\GenericConstraintTests.cs (6)
3231Assert.Equal("I<U> B.F<U>() where U : class", method.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 3757Assert.Equal("I2", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)); 3791Assert.Equal("I2`2", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)); 3825Assert.Equal("I2`1", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)); 3859Assert.Equal("I2`01", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)); 3908Assert.Equal("I2`1", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat));
Symbols\Metadata\PE\LoadingAttributes.cs (3)
1162Assert.Equal("AttributeUse.IFoo<System.Int16, System.UInt16>", (attrSym.CommonConstructorArguments[0].Value as INamedTypeSymbol).ToDisplayString(SymbolDisplayFormat.TestFormat)); 1211Assert.Equal("System.Linq.Expressions.Expression.BinaryExpressionProxy", ((ITypeSymbol)attr1.CommonConstructorArguments[0].Value).ToDisplayString(SymbolDisplayFormat.TestFormat)); 1216Assert.Equal("System.Linq.Expressions.Expression.TypeBinaryExpressionProxy", ((ITypeSymbol)attr1.CommonConstructorArguments[0].Value).ToDisplayString(SymbolDisplayFormat.TestFormat));
Symbols\Metadata\PE\TypeForwarders.cs (1)
1529return assembly.GetForwardedTypes().Select(t => t.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat));
Symbols\Source\CustomModifierCopyTests.cs (12)
1012interfaceMethod1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1022classMethod1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1067AssertEx.Equal("(object, object) C.M((object c, object d) x)", classMethod3.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1084AssertEx.Equal("(object a, object b) C.M((object c, object d) x)", classMethod4.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1140AssertEx.Equal("(object a, object b) I.P", interfaceProperty1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1146AssertEx.Equal("(object a, object b) C.P", classProperty1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1288baseMethod1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1296Assert.Equal("(object a, object b) Base.P", baseProperty1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1303Assert.Equal("(object a, object b) C.P", classProperty1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1307AssertEx.Equal("(object a, object b) C.M((object c, object d) y)", classMethod1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1335AssertEx.Equal("(object, object) C.M((object c, object d) y)", classMethod2.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1357AssertEx.Equal("(object a, object b) C.M((object, object) y)", classMethod3.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));
Symbols\Source\FileModifierTests.cs (1)
4126Assert.Equal("System.Void@<tree 0>", typeInfo.Type!.ToDisplayString(SymbolDisplayFormat.TestFormat.WithCompilerInternalOptions(SymbolDisplayCompilerInternalOptions.IncludeContainingFileForFileTypes)));
Symbols\Source\UsingAliasTests.cs (35)
54Assert.Equal("O=System.Object", alias1.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 60Assert.Equal("System.Object", b2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 61Assert.Equal("System.Object", info2.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 66Assert.Equal("System.Object", b3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 67Assert.Equal("System.Object", info3.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 114Assert.Equal("O=System.Object", alias1.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 120Assert.Equal("System.Object", b2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 121Assert.Equal("System.Object", info2.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 126Assert.Equal("System.Object", b3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 127Assert.Equal("System.Object", info3.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 166Assert.Equal("System.Object", info1.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 170Assert.Equal("O=System.Object", alias1.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 175Assert.Equal("System.Object", b2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 176Assert.Equal("System.Object", info2.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 181Assert.Equal("System.Object", b3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 182Assert.Equal("System.Object", info3.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 224Assert.Equal("System.Object", info1.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 228Assert.Equal("O=System.Object", alias1.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 233Assert.Equal("System.Object", b2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 234Assert.Equal("System.Object", info2.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 239Assert.Equal("System.Object", b3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 240Assert.Equal("System.Object", info3.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 276AssertEx.Equal(expected, usingAliasType.ToDisplayString(SymbolDisplayFormat.TestFormat)); 315Assert.Equal("System.Object", info2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 316Assert.Equal("System.Object", info2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 321Assert.Equal("System.Object", info3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 322Assert.Equal("System.Object", info3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 361Assert.Equal("System.Object", info2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 362Assert.Equal("System.Object", info2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 367Assert.Equal("System.Object", info3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 368Assert.Equal("System.Object", info3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 391Assert.Equal("O=System.Object", alias.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 412Assert.Equal("O=System.Object", alias.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 489Assert.Equal("O=System.Object", symbols[0].ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 510Assert.Equal("O=System.Object", symbols[0].ToDisplayString(format: SymbolDisplayFormat.TestFormat));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (26)
CompilationTestUtils.cs (5)
34string[] symbolDescriptions = (from s in symbols select s.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)).ToArray(); 49string[] symbolDescriptions = (from s in symbols select s.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)).ToArray(); 63AssertEx.SetEqual(symbols.Select(s => s.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)), descriptions); 74Assert.Equal(symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat), description); 79Assert.Equal(symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat), description);
CSharpTestBase.cs (4)
1425var format = SymbolDisplayFormat.TestFormat 1994return string.Format("\"{0}\"", (reference is Symbol symbol) ? symbol.ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat) : (object)reference); 2015return symbol?.ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat) ?? type.ToString();
Extensions.cs (2)
447var s1 = typeSym.ToDisplayString(SymbolDisplayFormat.TestFormat); 733return symbol.ToDisplayString(SymbolDisplayFormat.TestFormat);
NativeIntegerAttributesVisitor.cs (2)
29protected override SymbolDisplayFormat DisplayFormat => SymbolDisplayFormat.TestFormatWithConstraints.
NullableAttributesVisitor.cs (2)
54protected override SymbolDisplayFormat DisplayFormat => SymbolDisplayFormat.TestFormatWithConstraints.
RequiredMemberAttributesVisitor.cs (2)
27protected override SymbolDisplayFormat DisplayFormat => SymbolDisplayFormat.TestFormat;
SymbolUtilities.cs (8)
93private static SymbolDisplayFormat GetDisplayFormat(bool includeNonNullable) 95var format = SymbolDisplayFormat.TestFormat; 107SymbolDisplayFormat format = GetDisplayFormat(includeNonNullable); 121public static string[] ToTestDisplayStrings(this IEnumerable<Symbol> symbols, SymbolDisplayFormat format = null) 123format ??= SymbolDisplayFormat.TestFormat; 129SymbolDisplayFormat format = GetDisplayFormat(includeNonNullable); 135SymbolDisplayFormat format = GetDisplayFormat(includeNonNullable);
TestAttributesVisitor.cs (1)
119protected abstract SymbolDisplayFormat DisplayFormat { get; }
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Simplification\CSharpSimplificationService.Expander.cs (1)
35private static readonly SymbolDisplayFormat s_typeNameFormatWithGenerics =
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamespaceGenerator.cs (1)
178: ParseName(symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
InstructionDecoder.cs (1)
20internal static readonly SymbolDisplayFormat DisplayFormat = new SymbolDisplayFormat(
Microsoft.CodeAnalysis.Features (74)
CodeLens\CodeLensReferencesService.cs (1)
24private static readonly SymbolDisplayFormat MethodDisplayFormat =
Common\TaggedText.cs (1)
95getNavigationHint ??= static symbol => symbol?.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat);
Completion\Providers\AbstractOverrideCompletionProvider.ItemGetter.cs (1)
21private readonly SymbolDisplayFormat _overrideNameFormat = SymbolDisplayFormats.NameFormat.WithParameterOptions(
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (1)
18protected static readonly SymbolDisplayFormat SignatureDisplayFormat =
Debugging\AbstractBreakpointResolver.cs (1)
37private static readonly SymbolDisplayFormat s_vsDebugNameFormat =
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (7)
94public SymbolDisplayFormat Format { get; internal set; } 289public ImmutableArray<TaggedText> Format(string rawXmlText, ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat format, CancellationToken cancellationToken) 448private static (string target, string hint)? GetNavigationTarget(XElement element, SemanticModel semanticModel, int position, SymbolDisplayFormat format) 455return (target: SymbolKey.CreateString(symbol), hint: symbol.ToMinimalDisplayString(semanticModel, position, format ?? SymbolDisplayFormat.MinimallyQualifiedFormat)); 497string crefValue, int position, SemanticModel semanticModel, SymbolDisplayFormat format = null, SymbolDisplayPartKind kind = SymbolDisplayPartKind.Text) 505format ??= SymbolDisplayFormat.MinimallyQualifiedFormat; 520string crefValue, ISymbol typeResolutionSymbol, int position, SemanticModel semanticModel, SymbolDisplayFormat format)
DocumentationComments\IDocumentationCommentFormattingService.cs (1)
14ImmutableArray<TaggedText> Format(string? rawXmlText, ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat format, CancellationToken cancellationToken);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (4)
37private static readonly SymbolDisplayFormat s_unqualifiedMemberDisplayFormat = 54private static readonly SymbolDisplayFormat s_fullyQualifiedMemberDisplayFormat = 301var format = fullyQualify ? s_fullyQualifiedMemberDisplayFormat : s_unqualifiedMemberDisplayFormat; 404protected abstract SymbolDisplayFormat ErrorDisplayFormat { get; }
ExtractMethod\MethodExtractor.cs (2)
283typeParameter.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), 284currentType == null ? string.Empty : currentType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)));
FindUsages\DefinitionItemFactory.cs (1)
24private static readonly SymbolDisplayFormat s_namePartsFormat = new(
FindUsages\FindUsagesHelpers.cs (3)
52private static SymbolDisplayFormat GetFormat(ISymbol definition) 59private static readonly SymbolDisplayFormat s_definitionFormat = 79private static readonly SymbolDisplayFormat s_parameterDefinitionFormat = s_definitionFormat
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
59protected abstract string ToDisplayString(IParameterSymbol parameter, SymbolDisplayFormat format);
GenerateFromMembers\AbstractGenerateFromMembersCodeRefactoringProvider.cs (1)
121protected static readonly SymbolDisplayFormat SimpleFormat =
GenerateType\AbstractGenerateTypeService.State.cs (2)
359var format = SymbolDisplayFormat.FullyQualifiedFormat.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted);
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (1)
29private static readonly SymbolDisplayFormat s_displayFormat = new(
InlineHints\AbstractInlineTypeHintsService.cs (1)
18protected static readonly SymbolDisplayFormat s_minimalTypeStyle = new SymbolDisplayFormat(
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.cs (3)
16protected static readonly SymbolDisplayFormat s_minimalWithoutExpandedTuples = SymbolDisplayFormat.MinimallyQualifiedFormat.AddMiscellaneousOptions( 19private static readonly SymbolDisplayFormat s_delegateDisplay =
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (13)
24private static readonly SymbolDisplayFormat s_typeParameterOwnerFormat = 38private static readonly SymbolDisplayFormat s_memberSignatureDisplayFormat = 68private static readonly SymbolDisplayFormat s_descriptionStyle = 76private static readonly SymbolDisplayFormat s_globalNamespaceStyle = 110protected abstract ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat format); 113protected abstract SymbolDisplayFormat MinimallyQualifiedFormat { get; } 114protected abstract SymbolDisplayFormat MinimallyQualifiedFormatWithConstants { get; } 115protected abstract SymbolDisplayFormat MinimallyQualifiedFormatWithConstantsAndModifiers { get; } 170var format = ISymbolExtensions2.CrefFormat; 273private static readonly SymbolDisplayFormat s_formatForCaptures = SymbolDisplayFormat.MinimallyQualifiedFormat 485var style = s_descriptionStyle.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes); 804protected ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(ISymbol symbol, SymbolDisplayFormat? format = null)
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedSymbol.cs (4)
95public ImmutableArray<SymbolDisplayPart> ToDisplayParts(SymbolDisplayFormat format = null) 98public string ToDisplayString(SymbolDisplayFormat format = null) 101public string ToMinimalDisplayString(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null) 104public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (4)
120public string ToDisplayString(NullableFlowState topLevelNullability, SymbolDisplayFormat format = null) 123public ImmutableArray<SymbolDisplayPart> ToDisplayParts(NullableFlowState topLevelNullability, SymbolDisplayFormat format = null) 126public string ToMinimalDisplayString(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null) 129public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null)
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
299private static readonly SymbolDisplayFormat QualifiedNamespaceFormat = new(
PdbSourceDocument\ImplementationAssemblyLookupService.cs (1)
25private static readonly SymbolDisplayFormat s_metadataSymbolDisplayFormat = new SymbolDisplayFormat(
SemanticSearch\AbstractSemanticSearchService.cs (1)
245? exceptionTypeSymbol.ToDisplayParts(SymbolDisplayFormat.MinimallyQualifiedFormat).ToTaggedText()
Shared\Extensions\ISymbolExtensions_2.cs (1)
233public static readonly SymbolDisplayFormat CrefFormat =
SignatureHelp\AbstractSignatureHelpProvider.cs (6)
22protected static readonly SymbolDisplayFormat MinimallyQualifiedWithoutParametersFormat = 23SymbolDisplayFormat.MinimallyQualifiedFormat.WithMemberOptions( 24SymbolDisplayFormat.MinimallyQualifiedFormat.MemberOptions & ~SymbolDisplayMemberOptions.IncludeParameters); 26protected static readonly SymbolDisplayFormat MinimallyQualifiedWithoutTypeParametersFormat = 27SymbolDisplayFormat.MinimallyQualifiedFormat.WithGenericsOptions( 28SymbolDisplayFormat.MinimallyQualifiedFormat.GenericsOptions & ~SymbolDisplayGenericsOptions.IncludeTypeParameters);
Snippets\SnippetFunctionService.cs (1)
71var fullyQualifiedEnumName = typeSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (2)
30private static readonly SymbolDisplayFormat s_namespaceDisplayFormat = SymbolDisplayFormat
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
38private static readonly SymbolDisplayFormat ContainingTypeAndNameOnlyFormat = new(
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
423private static readonly SymbolDisplayFormat SimpleFormat =
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\AbstractImplementAbstractClassCodeFixProvider.cs (2)
48var id = GetCodeActionId(abstractClassType.ContainingAssembly.Name, abstractClassType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)); 60abstractClassType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceCodeFixProvider.cs (1)
106var typeName = interfaceType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (1)
26protected abstract string ToDisplayString(IMethodSymbol disposeImplMethod, SymbolDisplayFormat format);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
40private static readonly SymbolDisplayFormat s_format = new(
Testing\AbstractTestMethodFinder.cs (1)
23private static readonly SymbolDisplayFormat s_methodSymbolNoParametersDisplayFormat = new(
Microsoft.CodeAnalysis.Test.Utilities (8)
Compilation\CompilationDifference.cs (1)
150.Select(m => m.GetISymbol().ToDisplayString(SymbolDisplayFormat.TestFormat)));
Compilation\TestOperationVisitor.cs (4)
805VisualBasic.SymbolDisplay.ToDisplayString(method, SymbolDisplayFormat.TestFormat); 807CSharp.SymbolDisplay.ToDisplayString(method, SymbolDisplayFormat.TestFormat); 867VisualBasic.SymbolDisplay.ToDisplayString(operatorMethod, SymbolDisplayFormat.TestFormat); 869CSharp.SymbolDisplay.ToDisplayString(operatorMethod, SymbolDisplayFormat.TestFormat);
Extensions\SymbolExtensions.cs (1)
13return symbol.ToDisplayString(SymbolDisplayFormat.TestFormat);
Metadata\ILBuilderVisualizer.cs (2)
63return string.Format("\"{0}\"", symbol == null ? (object)reference : symbol.ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat)); 68return (((type as ISymbolInternal) ?? (type as Cci.IReference)?.GetInternalSymbol()) is ISymbolInternal symbol) ? symbol.GetISymbol().ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat) : type.ToString();
Microsoft.CodeAnalysis.VisualBasic (111)
Binding\LookupResult.vb (1)
1016GroupBy(Function(c) c.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat), IdentifierComparison.Comparer).
Emit\EditAndContinue\EmitHelpers.vb (1)
160String.Format(CodeAnalysisResources.Type0DoesNotHaveExpectedConstructor, type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)))
Emit\NamedTypeSymbolAdapter.vb (1)
789Return If(AdaptedNamedTypeSymbol.GetEmittedNamespaceName(), AdaptedNamedTypeSymbol.ContainingNamespace.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat))
Emit\NoPia\EmbeddedType.vb (1)
221New TypedConstant(stringType, TypedConstantKind.Primitive, UnderlyingNamedType.AdaptedNamedTypeSymbol.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat))),
Emit\NoPia\EmbeddedTypesManager.vb (1)
423ReportDiagnostic(diagnostics, ERRID.ERR_InteropMethodWithBody1, syntaxNodeOpt, method.AdaptedMethodSymbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat))
Emit\PEModuleBuilder.vb (2)
124_lazyDefaultNamespace = rootNamespace.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat) 538orderedForwardedTypes = orderedForwardedTypes.OrderBy(Function(t) t.OriginalDefinition.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat))
Emit\TypeMemberReference.vb (1)
26Return UnderlyingSymbol.ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat)
Errors\MessageProvider.vb (1)
102Return SymbolDisplay.ToDisplayString(symbol, SymbolDisplayFormat.VisualBasicShortErrorMessageFormat)
SymbolDisplay\CustomSymbolDisplayFormatter.vb (48)
16Friend Shared ReadOnly QualifiedNameFormat As SymbolDisplayFormat = New SymbolDisplayFormat( 29Friend Shared ReadOnly WithContainingTypeFormat As SymbolDisplayFormat = New SymbolDisplayFormat( 30globalNamespaceStyle:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.GlobalNamespaceStyle, 31typeQualificationStyle:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.TypeQualificationStyle, 32genericsOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.GenericsOptions, 33memberOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.MemberOptions Or 35kindOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.KindOptions, 36parameterOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.ParameterOptions, 37miscellaneousOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.MiscellaneousOptions) 40globalNamespaceStyle:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.GlobalNamespaceStyle, 41typeQualificationStyle:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.TypeQualificationStyle, 42genericsOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.GenericsOptions, 46parameterOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.ParameterOptions, 47propertyStyle:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.PropertyStyle, 48localOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.LocalOptions, 50miscellaneousOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.MiscellaneousOptions) 53globalNamespaceStyle:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.GlobalNamespaceStyle, 55genericsOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.GenericsOptions, 56memberOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.MemberOptions, 57parameterOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.ParameterOptions, 58propertyStyle:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.PropertyStyle, 59localOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.LocalOptions, 61miscellaneousOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.MiscellaneousOptions) 65globalNamespaceStyle:=SymbolDisplayFormat.VisualBasicShortErrorMessageFormat.GlobalNamespaceStyle, 66typeQualificationStyle:=SymbolDisplayFormat.VisualBasicShortErrorMessageFormat.TypeQualificationStyle, 67genericsOptions:=SymbolDisplayFormat.VisualBasicShortErrorMessageFormat.GenericsOptions, 68memberOptions:=SymbolDisplayFormat.VisualBasicShortErrorMessageFormat.MemberOptions, 69parameterOptions:=SymbolDisplayFormat.VisualBasicShortErrorMessageFormat.ParameterOptions, 70propertyStyle:=SymbolDisplayFormat.VisualBasicShortErrorMessageFormat.PropertyStyle, 71localOptions:=SymbolDisplayFormat.VisualBasicShortErrorMessageFormat.LocalOptions, 74miscellaneousOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.MiscellaneousOptions) 78globalNamespaceStyle:=SymbolDisplayFormat.ShortFormat.GlobalNamespaceStyle, 79typeQualificationStyle:=SymbolDisplayFormat.ShortFormat.TypeQualificationStyle, 81memberOptions:=SymbolDisplayFormat.ShortFormat.MemberOptions, 82parameterOptions:=SymbolDisplayFormat.ShortFormat.ParameterOptions, 83propertyStyle:=SymbolDisplayFormat.ShortFormat.PropertyStyle, 84localOptions:=SymbolDisplayFormat.ShortFormat.LocalOptions, 85kindOptions:=SymbolDisplayFormat.ShortFormat.KindOptions, 86miscellaneousOptions:=SymbolDisplayFormat.ShortFormat.MiscellaneousOptions) 90globalNamespaceStyle:=SymbolDisplayFormat.ShortFormat.GlobalNamespaceStyle, 93memberOptions:=SymbolDisplayFormat.ShortFormat.MemberOptions, 94parameterOptions:=SymbolDisplayFormat.ShortFormat.ParameterOptions, 95propertyStyle:=SymbolDisplayFormat.ShortFormat.PropertyStyle, 96localOptions:=SymbolDisplayFormat.ShortFormat.LocalOptions, 97kindOptions:=SymbolDisplayFormat.ShortFormat.KindOptions, 98miscellaneousOptions:=SymbolDisplayFormat.ShortFormat.MiscellaneousOptions) 113Return New FormattedSymbol(symbol, SymbolDisplayFormat.ShortFormat) 129Return New FormattedSymbol(symbol, SymbolDisplayFormat.VisualBasicErrorMessageFormat)
SymbolDisplay\SymbolDisplay.vb (17)
18''' Displays a symbol in the Visual Basic style, based on a <see cref="SymbolDisplayFormat"/>. 21''' <param name="format">The formatting options to apply. If Nothing is passed, <see cref="SymbolDisplayFormat.VisualBasicErrorMessageFormat"/> will be used.</param> 26Public Function ToDisplayString(symbol As ISymbol, Optional format As SymbolDisplayFormat = Nothing) As String 27format = If(format, SymbolDisplayFormat.VisualBasicErrorMessageFormat) 32''' Displays a symbol in the Visual Basic style, based on a <see cref="SymbolDisplayFormat"/>. 39''' <param name="format">The formatting options to apply. If null is passed, <see cref="SymbolDisplayFormat.CSharpErrorMessageFormat"/> will be used.</param> 47Optional format As SymbolDisplayFormat = Nothing) As String 48format = If(format, SymbolDisplayFormat.MinimallyQualifiedFormat) 55format As SymbolDisplayFormat, 72''' <param name="format">The formatting options to apply. If Nothing Is passed, <see cref="SymbolDisplayFormat.VisualBasicErrorMessageFormat"/> will be used.</param> 78Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) 79format = If(format, SymbolDisplayFormat.VisualBasicErrorMessageFormat) 90''' <param name="format">The formatting options to apply. If null is passed, <see cref="SymbolDisplayFormat.CSharpErrorMessageFormat"/> will be used.</param> 98Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) 99format = If(format, SymbolDisplayFormat.MinimallyQualifiedFormat) 106format As SymbolDisplayFormat, 119format As SymbolDisplayFormat,
SymbolDisplay\SymbolDisplayVisitor.vb (3)
31format As SymbolDisplayFormat, 42format As SymbolDisplayFormat, 55Protected Shadows Sub Initialize(builder As ArrayBuilder(Of SymbolDisplayPart), format As SymbolDisplayFormat, isFirstSymbolVisited As Boolean, semanticModelOpt As SemanticModel, positionOpt As Integer, inNamespaceOrType As Boolean)
Symbols\AssemblySymbol.vb (1)
776Return ImmutableArrayExtensions.AsImmutable(Of INamedTypeSymbol)(GetAllTopLevelForwardedTypes().OrderBy(Function(t) t.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)))
Symbols\Attributes\AttributeData.vb (1)
102Dim className As String = Me.AttributeClass.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat)
Symbols\Metadata\PE\PENamespaceSymbol.vb (1)
183If(isGlobalNamespace, 0, ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat).Length),
Symbols\NamespaceSymbol.vb (1)
322Dim qualifiedName As String = Me.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat)
Symbols\ObsoleteAttributeHelpers.vb (2)
145Return ErrorFactory.ErrorInfo(ERRID.WRN_Experimental, New FormattedSymbol(symbol, SymbolDisplayFormat.VisualBasicErrorMessageFormat)) 153data, New FormattedSymbol(symbol, SymbolDisplayFormat.VisualBasicErrorMessageFormat))
Symbols\Retargeting\RetargetingSymbolTranslator.vb (3)
262Dim name = MetadataTypeName.FromFullName(type.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat), forcedArity:=type.Arity) 340Dim namespaceName As String = If(type.GetEmittedNamespaceName(), type.ContainingNamespace.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat)) 375Dim namespaceName As String = If(type.GetEmittedNamespaceName(), type.ContainingNamespace.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat))
Symbols\Source\SourceNamedTypeSymbol.vb (5)
85Dim emittedName As String = If(Me.GetEmittedNamespaceName(), Me.ContainingNamespace.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat)) 579containingNamespace.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat)) 598Dim constituentQualifiedName As String = constituent.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat) 2528eventInterfaceName = container1.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat) & "+" & eventInterfaceName 2624IdentifierComparison.Equals(mainTypeName, Me.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat)) Then
Symbols\Source\SourceNamespaceSymbol.vb (2)
529Return ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat) 552Debug.Assert(IdentifierComparison.Equals(fullDeclName, ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat)))
Symbols\Source\SynthesizedMyGroupCollectionPropertyAccessorSymbol.vb (1)
59Dim targetTypeName As String = PropertyOrEvent.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)
Symbols\Symbol.vb (10)
860Return ToDisplayString(SymbolDisplayFormat.VisualBasicErrorMessageFormat) 863Public Function ToDisplayString(Optional format As SymbolDisplayFormat = Nothing) As String 867Public Function ToDisplayParts(Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) 871Public Function ToMinimalDisplayString(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String 875Public Function ToMinimalDisplayParts(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) 880Return String.Format("{0} {1}", Me.Kind, Me.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1324Private Function ISymbol_ToDisplayString(Optional format As SymbolDisplayFormat = Nothing) As String Implements ISymbol.ToDisplayString 1328Private Function ISymbol_ToDisplayParts(Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) Implements ISymbol.ToDisplayParts 1332Private Function ISymbol_ToMinimalDisplayString(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String Implements ISymbol.ToMinimalDisplayString 1336Private Function ISymbol_ToMinimalDisplayParts(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) Implements ISymbol.ToMinimalDisplayParts
Symbols\SynthesizedSymbols\SynthesizedLocal.vb (1)
98builder.Append(Me.Type.ToDisplayString(SymbolDisplayFormat.TestFormat))
Symbols\TypedConstant.vb (1)
57Dim typeName As String = constant.Type.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat)
Symbols\TypeSymbol.vb (4)
614Private Function ITypeSymbol_ToDisplayString(topLevelNullability As NullableFlowState, Optional format As SymbolDisplayFormat = Nothing) As String Implements ITypeSymbol.ToDisplayString 618Private Function ITypeSymbol_ToDisplayParts(topLevelNullability As NullableFlowState, Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) Implements ITypeSymbol.ToDisplayParts 622Private Function ITypeSymbol_ToMinimalDisplayString(semanticModel As SemanticModel, topLevelNullability As NullableFlowState, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String Implements ITypeSymbol.ToMinimalDisplayString 626Private Function ITypeSymbol_ToMinimalDisplayParts(semanticModel As SemanticModel, topLevelNullability As NullableFlowState, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) Implements ITypeSymbol.ToMinimalDisplayParts
Symbols\TypeSymbolExtensions.vb (1)
1236Return String.Equals(container.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat), qualifiedName, comparison)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
31Protected Overrides Function ToDisplayString(disposeImplMethod As IMethodSymbol, format As SymbolDisplayFormat) As String
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamespaceGenerator.vb (1)
131Return SyntaxFactory.ParseName(symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (24)
Attributes\AttributeTests_Tuples.vb (1)
282Dim symbolString = String.Join(" | ", typeSymbols.Select(Function(s) s.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)))
CodeGen\CodeGenDelegateCreation.vb (20)
62Assert.Equal("System.Void", ctor.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 64Assert.Equal("System.Object", ctor.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 66Assert.Equal("System.IntPtr", ctor.Parameters(1).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 81Assert.Equal("System.Void", invoke.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 83Assert.Equal("System.Int32", invoke.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 86Assert.Equal("System.String", invoke.Parameters(1).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 106Assert.Equal("System.IAsyncResult", beginInvoke.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 108Assert.Equal("System.Int32", beginInvoke.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 111Assert.Equal("System.String", beginInvoke.Parameters(1).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 114Assert.Equal("System.AsyncCallback", beginInvoke.Parameters(2).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 117Assert.Equal("System.Object", beginInvoke.Parameters(3).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 134Assert.Equal("System.Void", endInvoke.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 136Assert.Equal("System.String", endInvoke.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 139Assert.Equal("System.IAsyncResult", endInvoke.Parameters(1).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 159Assert.Equal("System.Char", invoke.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 161Assert.Equal("System.Int32", invoke.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 164Assert.Equal("System.String", invoke.Parameters(1).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 180Assert.Equal("System.Char", endInvoke.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 182Assert.Equal("System.IAsyncResult", endInvoke.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 202Assert.Equal("T", invoke.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat))
CodeGen\CodeGenTuples.vb (2)
23172Assert.Equal(expectedCSharp, CSharp.SymbolDisplay.ToDisplayString(type, SymbolDisplayFormat.TestFormat)) 23173Assert.Equal(expectedVisualBasic, VisualBasic.SymbolDisplay.ToDisplayString(type, SymbolDisplayFormat.TestFormat))
Emit\DeterministicTests.vb (1)
257Return GetForwardedTypes(assembly).Select(Function(t) t.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat))
Microsoft.CodeAnalysis.VisualBasic.Features (28)
CodeLens\VisualBasicDisplayInfoService.vb (1)
16Private Shared ReadOnly Format As SymbolDisplayFormat = New SymbolDisplayFormat(
Completion\CompletionProviders\CompletionListTagCompletionProvider.vb (1)
87Dim displayFormat = SymbolDisplayFormat.MinimallyQualifiedFormat.WithMemberOptions(SymbolDisplayMemberOptions.IncludeContainingType).WithKindOptions(SymbolDisplayKindOptions.None)
Completion\CompletionProviders\CrefCompletionProvider.vb (3)
26Private Shared ReadOnly s_crefFormat As SymbolDisplayFormat = 34Private Shared ReadOnly s_minimalParameterTypeFormat As SymbolDisplayFormat = 35SymbolDisplayFormat.MinimallyQualifiedFormat.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.ExpandValueTuple)
Completion\CompletionProviders\EnumCompletionProvider.vb (1)
112Dim displayFormat = SymbolDisplayFormat.MinimallyQualifiedFormat.WithMemberOptions(SymbolDisplayMemberOptions.IncludeContainingType).WithLocalOptions(SymbolDisplayLocalOptions.None)
Completion\CompletionProviders\ImplementsClauseCompletionProvider.vb (2)
295Private Shared ReadOnly MinimalFormatWithoutGenerics As SymbolDisplayFormat = 296SymbolDisplayFormat.MinimallyQualifiedFormat.WithGenericsOptions(SymbolDisplayGenericsOptions.None)
Completion\CompletionProviders\PartialTypeCompletionProvider.vb (2)
25Private Shared ReadOnly _insertionTextFormatWithGenerics As SymbolDisplayFormat = 37Private Shared ReadOnly _displayTextFormat As SymbolDisplayFormat =
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (2)
1063Protected Overrides ReadOnly Property ErrorDisplayFormat As SymbolDisplayFormat 1065Return SymbolDisplayFormat.VisualBasicShortErrorMessageFormat
GenerateConstructorFromMembers\VisualBasicGenerateConstructorFromMembersCodeRefactoringProvider.vb (1)
38Protected Overrides Function ToDisplayString(parameter As IParameterSymbol, format As SymbolDisplayFormat) As String
LanguageServices\VisualBasicSymbolDisplayService.SymbolDescriptionBuilder.vb (9)
18Private Shared ReadOnly s_minimallyQualifiedFormat As SymbolDisplayFormat = SymbolDisplayFormat.MinimallyQualifiedFormat _ 22Private Shared ReadOnly s_minimallyQualifiedFormatWithConstants As SymbolDisplayFormat = s_minimallyQualifiedFormat _ 27Private Shared ReadOnly s_minimallyQualifiedFormatWithConstantsAndModifiers As SymbolDisplayFormat = s_minimallyQualifiedFormatWithConstants _ 89Protected Overrides Function ToMinimalDisplayParts(symbol As ISymbol, semanticModel As SemanticModel, position As Integer, format As SymbolDisplayFormat) As ImmutableArray(Of SymbolDisplayPart) 94Return If(symbol Is Nothing, Nothing, CodeAnalysis.VisualBasic.SymbolDisplay.ToDisplayString(symbol, SymbolDisplayFormat.MinimallyQualifiedFormat)) 176Protected Overrides ReadOnly Property MinimallyQualifiedFormat As SymbolDisplayFormat = s_minimallyQualifiedFormat 178Protected Overrides ReadOnly Property MinimallyQualifiedFormatWithConstants As SymbolDisplayFormat = s_minimallyQualifiedFormatWithConstants 180Protected Overrides ReadOnly Property MinimallyQualifiedFormatWithConstantsAndModifiers As SymbolDisplayFormat = s_minimallyQualifiedFormatWithConstantsAndModifiers
NavigationBar\VisualBasicNavigationBarItemService.vb (2)
25Private ReadOnly _typeFormat As SymbolDisplayFormat = New SymbolDisplayFormat( 28Private ReadOnly _memberFormat As SymbolDisplayFormat = New SymbolDisplayFormat(
SignatureHelp\GenericNameSignatureHelpProvider.vb (3)
147Private Shared ReadOnly s_minimallyQualifiedFormat As SymbolDisplayFormat = SymbolDisplayFormat.MinimallyQualifiedFormat.WithGenericsOptions(SymbolDisplayFormat.MinimallyQualifiedFormat.GenericsOptions Or SymbolDisplayGenericsOptions.IncludeVariance)
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
31Protected Overrides Function ToDisplayString(disposeImplMethod As IMethodSymbol, format As SymbolDisplayFormat) As String
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (53)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (11)
403Assert.Equal("N1", sym1.ToDisplayString(SymbolDisplayFormat.TestFormat)) 412Assert.Equal(sym1.ToDisplayString(SymbolDisplayFormat.TestFormat), sym2.ToDisplayString(SymbolDisplayFormat.TestFormat)) 419Assert.Equal("N1.E1", sym1.ToDisplayString(SymbolDisplayFormat.TestFormat)) 427Assert.Equal("N1.C1", sym1.ToDisplayString(SymbolDisplayFormat.TestFormat)) 437Assert.Equal(sym1.ToDisplayString(SymbolDisplayFormat.TestFormat), sym2.ToDisplayString(SymbolDisplayFormat.TestFormat)) 446Assert.Equal(sym1.ToDisplayString(SymbolDisplayFormat.TestFormat), sym2.ToDisplayString(SymbolDisplayFormat.TestFormat)) 2474Assert.Equal("Program.D", delegateSymbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 2571Assert.Equal("Sub [Class].Bob()", memberSymbol.ToDisplayString(SymbolDisplayFormat.TestFormat))
Semantics\BinaryOperators.vb (1)
1221Assert.Equal("System.String System.String.op_Concatenate(System.String left, System.String right)", CSharp.SymbolDisplay.ToDisplayString(symbol1, SymbolDisplayFormat.TestFormat))
Semantics\FieldInitializerBindingTests.vb (9)
448Assert.Equal("System.Int16()", ary.Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 453Assert.Equal("System.Single()", ary.Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 458Assert.Equal("System.Object()", ary.Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 463Assert.Equal("System.Object", ary.Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 507Assert.Equal("System.Double", field.Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 513Assert.Equal("System.Int64", field.Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 519Assert.Equal("System.Int16", field.Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 524Assert.Equal("System.Object", field.Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 529Assert.Equal("System.Func(Of System.String, System.UInt64)", field.Type.ToDisplayString(SymbolDisplayFormat.TestFormat))
Semantics\GetExtendedSemanticInfoTests.vb (7)
3052Assert.Equal("Function C.goo() As System.Int32", semanticInfo.MemberGroup(0).ToDisplayString(SymbolDisplayFormat.TestFormat)) 3403Assert.Equal("Sub MyAttribute..ctor()", semanticInfo.Symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 3404Assert.Equal("MyAttribute", semanticInfo.Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 6675semanticInfoEx.GetEnumeratorMethod.ToDisplayString(SymbolDisplayFormat.TestFormat)) 6679semanticInfoEx.CurrentProperty.ToDisplayString(SymbolDisplayFormat.TestFormat)) 6742semanticInfoEx.GetEnumeratorMethod.ToDisplayString(SymbolDisplayFormat.TestFormat)) 6746semanticInfoEx.CurrentProperty.ToDisplayString(SymbolDisplayFormat.TestFormat))
Semantics\GetSemanticInfoTests.vb (16)
1141Assert.Equal("System.Int32", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1149Assert.Equal("System.Int32()", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1157Assert.Equal("AClass", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1165Assert.Equal("AClass()", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1173Assert.Equal("AStructure(,)", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1181Assert.Equal("System.RuntimeTypeHandle", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1189Assert.Equal("System.RuntimeTypeHandle()", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1197Assert.Equal("Generic(Of System.Int32)", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1205Assert.Equal("Generic(Of )", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1213Assert.Equal("System.Void", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1221Assert.Equal("System.Void()", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1230Assert.Equal("AClass", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1239Assert.Equal("System.Int32", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1241Assert.Equal("MyAlias1=System.Int32", semanticInfo.Alias.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1250Assert.Equal("Generic(Of AClass)", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 1252Assert.Equal("MyAlias2=Generic(Of AClass)", semanticInfo.Alias.ToDisplayString(SymbolDisplayFormat.TestFormat))
Semantics\NativeIntegerTests.vb (4)
26Assert.Equal("Sub I.F1(x As System.IntPtr, y As System.IntPtr)", SymbolDisplay.ToDisplayString(method, SymbolDisplayFormat.TestFormat)) 31Assert.Equal("Sub I.F2(x As System.UIntPtr, y As System.UIntPtr)", SymbolDisplay.ToDisplayString(method, SymbolDisplayFormat.TestFormat)) 40Assert.Equal("Sub I.F1(x As System.IntPtr, y As System.IntPtr)", SymbolDisplay.ToDisplayString(method, SymbolDisplayFormat.TestFormat)) 45Assert.Equal("Sub I.F2(x As System.UIntPtr, y As System.UIntPtr)", SymbolDisplay.ToDisplayString(method, SymbolDisplayFormat.TestFormat))
Semantics\TypeOfTests.vb (5)
746Assert.Equal("System.Boolean", semantics.GetTypeInfo(typeOfExpressions(0)).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 747Assert.Equal("System.String", semantics.GetSymbolInfo(typeOfExpressions(0).Type).Symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 753Assert.Equal("System.Int32", semantics.GetSymbolInfo(typeOfExpressions(1).Type).Symbol.ToDisplayString(SymbolDisplayFormat.TestFormat)) 756Assert.Equal("System.Boolean", semantics.GetTypeInfo(typeOfExpressions(2)).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 757Assert.Equal("System.String", semantics.GetSymbolInfo(typeOfExpressions(2).Type).Symbol.ToDisplayString(SymbolDisplayFormat.TestFormat))
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (139)
SymbolDisplay\SymbolDisplayTests.vb (83)
136SymbolDisplayFormat.FullyQualifiedFormat, 922Dim format As SymbolDisplayFormat = Nothing 1511Dim format As SymbolDisplayFormat = New SymbolDisplayFormat( 3733Dim format = SymbolDisplayFormat.MinimallyQualifiedFormat 4100globalNamespaceStyle:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.GlobalNamespaceStyle, 4101typeQualificationStyle:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.TypeQualificationStyle, 4102genericsOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.GenericsOptions, 4103memberOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.MemberOptions, 4104parameterOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.ParameterOptions, 4105propertyStyle:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.PropertyStyle, 4106localOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.LocalOptions, 4109miscellaneousOptions:=SymbolDisplayFormat.VisualBasicErrorMessageFormat.MiscellaneousOptions) 4139typeQualificationStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.TypeQualificationStyle, 4140genericsOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.GenericsOptions, 4141memberOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.MemberOptions, 4142delegateStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.DelegateStyle, 4143extensionMethodStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.ExtensionMethodStyle, 4144parameterOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.ParameterOptions, 4145propertyStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.PropertyStyle, 4146localOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.LocalOptions, 4147kindOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.KindOptions, 4148miscellaneousOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.MiscellaneousOptions) 4191typeQualificationStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.TypeQualificationStyle, 4192genericsOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.GenericsOptions, 4193memberOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.MemberOptions, 4194delegateStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.DelegateStyle, 4195extensionMethodStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.ExtensionMethodStyle, 4196parameterOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.ParameterOptions, 4197propertyStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.PropertyStyle, 4198localOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.LocalOptions, 4199kindOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.KindOptions, 4200miscellaneousOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.MiscellaneousOptions) 4241typeQualificationStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.TypeQualificationStyle, 4242genericsOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.GenericsOptions, 4243memberOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.MemberOptions, 4244delegateStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.DelegateStyle, 4245extensionMethodStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.ExtensionMethodStyle, 4246parameterOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.ParameterOptions, 4247propertyStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.PropertyStyle, 4248localOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.LocalOptions, 4249kindOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.KindOptions, 4250miscellaneousOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.MiscellaneousOptions) 4405typeQualificationStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.TypeQualificationStyle, 4406genericsOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.GenericsOptions, 4407memberOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.MemberOptions, 4408delegateStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.DelegateStyle, 4409extensionMethodStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.ExtensionMethodStyle, 4410parameterOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.ParameterOptions, 4411propertyStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.PropertyStyle, 4412localOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.LocalOptions, 4413kindOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.KindOptions, 4414miscellaneousOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.MiscellaneousOptions) 4461typeQualificationStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.TypeQualificationStyle, 4462genericsOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.GenericsOptions, 4463memberOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.MemberOptions, 4464delegateStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.DelegateStyle, 4465extensionMethodStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.ExtensionMethodStyle, 4466parameterOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.ParameterOptions, 4467propertyStyle:=SymbolDisplayFormat.MinimallyQualifiedFormat.PropertyStyle, 4468localOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.LocalOptions, 4469kindOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.KindOptions, 4470miscellaneousOptions:=SymbolDisplayFormat.MinimallyQualifiedFormat.MiscellaneousOptions) 4857Assert.Equal("Outer.Inner(Of T)", VisualBasic.SymbolDisplay.ToDisplayString(type, SymbolDisplayFormat.TestFormat)) 4858Assert.Equal("Sub Outer.M(Of U)()", VisualBasic.SymbolDisplay.ToDisplayString(method, SymbolDisplayFormat.TestFormat)) 4859Assert.Equal("WriteOnly Property Outer.P As System.String", VisualBasic.SymbolDisplay.ToDisplayString([property], SymbolDisplayFormat.TestFormat)) 4860Assert.Equal("Outer.F As System.Int32", VisualBasic.SymbolDisplay.ToDisplayString(field, SymbolDisplayFormat.TestFormat)) 4861Assert.Equal("Event Outer.E As System.Action", VisualBasic.SymbolDisplay.ToDisplayString([event], SymbolDisplayFormat.TestFormat)) 4862Assert.Equal("Outer.D", VisualBasic.SymbolDisplay.ToDisplayString([delegate], SymbolDisplayFormat.TestFormat)) 4863Assert.Equal("Function Outer.Error() As Missing", VisualBasic.SymbolDisplay.ToDisplayString([error], SymbolDisplayFormat.TestFormat)) 4934Dim formatWithoutAllowDefaultLiteral = SymbolDisplayFormat.MinimallyQualifiedFormat 5177SymbolDisplay.ToDisplayParts(symbol, SymbolDisplayFormat.MinimallyQualifiedFormat), 5268ToDisplayParts(model.GetSymbolInfo(actualThis).Symbol, SymbolDisplayFormat.MinimallyQualifiedFormat), 5280ToDisplayParts(model.GetSymbolInfo(escapedThis).Symbol, SymbolDisplayFormat.MinimallyQualifiedFormat), 5300Dim format = SymbolDisplayFormat.VisualBasicErrorMessageFormat. 5495Dim description = symbol.ToMinimalDisplayParts(model, position, SymbolDisplayFormat.MinimallyQualifiedFormat) 5587Verify(SymbolDisplay.ToDisplayParts(type.GetMembers("F1").Single(), SymbolDisplayFormat.TestFormat), 5602Verify(SymbolDisplay.ToDisplayParts(type.GetMembers("F2").Single(), SymbolDisplayFormat.TestFormat), 5635Dim format = SymbolDisplayFormat.TestFormat.WithParameterOptions(SymbolDisplayParameterOptions.IncludeType Or SymbolDisplayParameterOptions.IncludeName) 5694Dim format = SymbolDisplayFormat.TestFormat.WithLocalOptions(SymbolDisplayLocalOptions.IncludeType) 5734Verify(op.ToDisplayParts(SymbolDisplayFormat.TestFormat), 5841Verify(op.ToDisplayParts(SymbolDisplayFormat.TestFormat), 6009format As SymbolDisplayFormat, 6053format As SymbolDisplayFormat,
SymbolsTests\CheckedUserDefinedOperatorsTests.vb (5)
196Assert.Equal("Function C0.op_CheckedUnaryNegation(x As C0) As C0", SymbolDisplay.ToDisplayString(operators(0), SymbolDisplayFormat.TestFormat)) 197Assert.Equal("Function C0.op_CheckedDecrement(x As C0) As C0", SymbolDisplay.ToDisplayString(operators(1), SymbolDisplayFormat.TestFormat)) 198Assert.Equal("Function C0.op_CheckedIncrement(x As C0) As C0", SymbolDisplay.ToDisplayString(operators(2), SymbolDisplayFormat.TestFormat)) 380Assert.Equal("Function C0." + metadataName + "(x As C0, y As C0) As C0", SymbolDisplay.ToDisplayString(operators(0), SymbolDisplayFormat.TestFormat)) 559Assert.Equal("Function C0.op_CheckedExplicit(x As C0) As System.Int64", SymbolDisplay.ToDisplayString(operators(0), SymbolDisplayFormat.TestFormat))
SymbolsTests\CompilationCreationTests.vb (4)
1895Assert.Equal(typeC301.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat), asm3.GlobalNamespace.GetTypeMembers("C3").Single().GetTypeMembers("C301").Single().ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)) 1896Assert.Equal(typeC6.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat), asm3.GlobalNamespace.GetTypeMembers("C6").Single().ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat))
SymbolsTests\Metadata\MetadataTypeTests.vb (5)
409Assert.Equal("I2", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)) 446Assert.Equal("I2`2", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)) 483Assert.Equal("I2`1", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)) 520Assert.Equal("I2`01", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)) 572Assert.Equal("I2`1", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat))
SymbolsTests\Metadata\PE\LoadingAttributes.vb (10)
131Assert.Equal("System.String", CType(aTypeInst.CommonConstructorArguments.Single().Value, Symbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 203Assert.Equal("System.String", CType(aTypeInst.CommonConstructorArguments.Single().Value, Symbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 496Assert.Equal("System.Collections.Generic.List(Of )", DirectCast(l.GetAttributes.First().CommonConstructorArguments.Single().Value, Symbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 499Assert.Equal("System.Collections.Generic.List(Of C1)", DirectCast(l.GetAttributes.First().CommonConstructorArguments.Single().Value, Symbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 502Assert.Equal("System.Collections.Generic.List(Of System.String)", DirectCast(l.GetAttributes.First().CommonConstructorArguments.Single().Value, Symbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 505Assert.Equal("System.Collections.Generic.List(Of System.Collections.Generic.KeyValuePair(Of C1, System.String))", DirectCast(l.GetAttributes.First().CommonConstructorArguments.Single().Value, Symbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 508Assert.Equal("System.Collections.Generic.List(Of System.Collections.Generic.KeyValuePair(Of System.String, C1.InnerC1(Of System.Int32).InnerC2(Of System.String, System.String)))", DirectCast(l.GetAttributes.First().CommonConstructorArguments.Single().Value, Symbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 1239Assert.Equal("AttributeUse.IFoo(Of System.Int16, System.UInt16)", TryCast(attrSym.CommonConstructorArguments(0).Value, NamedTypeSymbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 1292Assert.Equal("System.Linq.Expressions.Expression.BinaryExpressionProxy", CType(attr1.CommonConstructorArguments(0).Value, TypeSymbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 1297Assert.Equal("System.Linq.Expressions.Expression.TypeBinaryExpressionProxy", CType(attr1.CommonConstructorArguments(0).Value, TypeSymbol).ToDisplayString(SymbolDisplayFormat.TestFormat))
SymbolsTests\Metadata\PE\TypeForwarders.vb (1)
1216Return DirectCast(assembly, IAssemblySymbol).GetForwardedTypes().Select(Function(t) t.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat))
SymbolsTests\RefStructInterfacesTests.vb (4)
82AssertEx.Equal("A(Of T)", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)) 86AssertEx.Equal("B(Of S)", b.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)) 90AssertEx.Equal("C(Of T)", c.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)) 94AssertEx.Equal("C(Of S)", c.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints))
SymbolsTests\Source\BindingsTests.vb (1)
493Assert.Equal("Goo.Bar.N1.N2.Yellow(Of System.Int32)", symbol.ToDisplayString(SymbolDisplayFormat.TestFormat))
SymbolsTests\Source\DelegateTests.vb (26)
62Assert.Equal("System.MulticastDelegate", subDel.BaseType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 71Assert.Equal("System.Void", delegateCtor.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 73Assert.Equal("System.Object", delegateCtor.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 75Assert.Equal("System.IntPtr", delegateCtor.Parameters(1).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 82Assert.Equal("System.Void", delegateInvoke.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 85Assert.Equal("System.Int32", delegateInvoke.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 87Assert.Equal("System.String", delegateInvoke.Parameters(1).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 95Assert.Equal("System.IAsyncResult", delegateBeginInvoke.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 97Assert.Equal("System.Int32", delegateBeginInvoke.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 100Assert.Equal("System.String", delegateBeginInvoke.Parameters(1).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 102Assert.Equal("System.AsyncCallback", delegateBeginInvoke.Parameters(2).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 105Assert.Equal("System.Object", delegateBeginInvoke.Parameters(3).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 113Assert.Equal("System.Void", delegateEndInvoke.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 115Assert.Equal("System.String", delegateEndInvoke.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 118Assert.Equal("System.IAsyncResult", delegateEndInvoke.Parameters(1).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 126Assert.Equal("System.MulticastDelegate", subDel.BaseType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 133Assert.Equal("System.Char", delegateInvoke.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 136Assert.Equal("System.Int32", delegateInvoke.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 138Assert.Equal("System.String", delegateInvoke.Parameters(1).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 144Assert.Equal("System.Char", delegateEndInvoke.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 146Assert.Equal("System.IAsyncResult", delegateEndInvoke.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 152Assert.Equal("System.MulticastDelegate", genSubDel.BaseType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 159Assert.Equal("System.Void", delegateInvoke.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 162Assert.Equal("T", delegateInvoke.Parameters(0).Type.ToDisplayString(SymbolDisplayFormat.TestFormat)) 167Assert.Equal("System.MulticastDelegate", genSubDel.BaseType.ToDisplayString(SymbolDisplayFormat.TestFormat)) 173Assert.Equal("T", delegateInvoke.ReturnType.ToDisplayString(SymbolDisplayFormat.TestFormat))
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (7)
CompilationTestUtils.vb (5)
712Assert.True(TypeOf currentSymbol Is NamespaceOrTypeSymbol, String.Format("{0} does not have members", currentSymbol.ToDisplayString(SymbolDisplayFormat.TestFormat))) 715Assert.True(members.Any(), String.Format("No members named {0} inside {1}", name, currentSymbol.ToDisplayString(SymbolDisplayFormat.TestFormat))) 716Assert.True(members.Length() <= 1, String.Format("Multiple members named {0} inside {1}", name, currentSymbol.ToDisplayString(SymbolDisplayFormat.TestFormat))) 1209Dim symbolDescriptions As String() = (From s In symbols Select s.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)).ToArray() 1223Assert.Equal(symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat), description)
Extensions.vb (2)
120Return type.GetMembers().OfType(Of FieldSymbol)().Select(Of String)(Function(f) f.Name + ": " + f.Type.ToDisplayString(SymbolDisplayFormat.TestFormat)).ToArray() 200Dim s1 = typeSym.ToDisplayString(SymbolDisplayFormat.TestFormat)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Simplification\VisualBasicSimplificationService.Expander.vb (1)
251symbolDisplayFormat As SymbolDisplayFormat) As InvocationExpressionSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamespaceGenerator.vb (1)
131Return SyntaxFactory.ParseName(symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat))
Microsoft.CodeAnalysis.Workspaces (13)
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (1)
262private static readonly SymbolDisplayFormat DottedNameFormat =
Rename\ConflictEngine\ConflictResolver.cs (1)
28private static readonly SymbolDisplayFormat s_metadataSymbolDisplayFormat = new(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamespaceOrTypeSymbolExtensions.cs (1)
19private static readonly SymbolDisplayFormat s_shortNameFormat = new(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolDisplayFormats.cs (2)
15public static readonly SymbolDisplayFormat NameFormat = 34public static readonly SymbolDisplayFormat SignatureFormat =
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (4)
198public string ToDisplayString(SymbolDisplayFormat format = null) 201public ImmutableArray<SymbolDisplayPart> ToDisplayParts(SymbolDisplayFormat format = null) 204public string ToMinimalDisplayString(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null) 207public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (4)
64public string ToDisplayString(NullableFlowState topLevelNullability, SymbolDisplayFormat format = null) 67public ImmutableArray<SymbolDisplayPart> ToDisplayParts(NullableFlowState topLevelNullability, SymbolDisplayFormat format = null) 70public string ToMinimalDisplayString(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null) 73public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null)
Microsoft.DotNet.CodeAnalysis (1)
Helpers.cs (1)
10private static readonly SymbolDisplayFormat s_publicApiFormat =
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
380SymbolDisplayFormat.FullyQualifiedFormat.WithMiscellaneousOptions(
Microsoft.Extensions.Options.SourceGeneration (12)
Parser.cs (12)
187=> type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier)); 190=> type.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat.AddGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeParameters)); 193=> type.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat.WithGenericsOptions(SymbolDisplayGenericsOptions.None)); 284&& !baseType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat).StartsWith("global::System.", StringComparison.Ordinal)) 375transValidatorTypeName = transValidatorType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); 438enumerationValidatorTypeName = enumerationValidatorType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); 475Diag(DiagDescriptors.InaccessibleValidationAttribute, location, attributeType.Name, member.OriginalDefinition.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat), validatorType.Name); 479string attributeFullQualifiedName = attributeType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); 607trackedTypeList!.Add(memberType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)); 625trackedTypeList!.Add((modelType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), (string)attribute.ConstructorArguments[0].Value!)); 819return $"typeof({sym.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)})"; 832return $"({type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}){Convert.ToString(value, CultureInfo.InvariantCulture)}";
Microsoft.Gen.ComplianceReports (1)
Parser.cs (1)
94var result = typeSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
Microsoft.Gen.Logging (4)
Parsing\Parser.cs (1)
556SymbolDisplayFormat.FullyQualifiedFormat.WithMiscellaneousOptions(
Parsing\Parser.LogProperties.cs (1)
199Type = property.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
Parsing\Parser.TagProvider.cs (2)
39lp.TagProvider = new(providerMethod.Name, providerType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)); 67lp.TagProvider = new(providerMethod.Name, providerType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
Microsoft.Gen.Logging.Unit.Tests (1)
LogParserUtilitiesTests.cs (1)
158paramTypeMock.Setup(x => x.ToDisplayString(It.IsAny<SymbolDisplayFormat>()))
Microsoft.Gen.Metrics (4)
Parser.cs (4)
26private static readonly SymbolDisplayFormat _typeSymbolFormat = 27SymbolDisplayFormat.FullyQualifiedFormat.WithMiscellaneousOptions( 30private static readonly SymbolDisplayFormat _genericTypeSymbolFormat = 31SymbolDisplayFormat.FullyQualifiedFormat.WithMiscellaneousOptions(
Microsoft.Gen.MetricsReports (4)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (4)
26private static readonly SymbolDisplayFormat _typeSymbolFormat = 27SymbolDisplayFormat.FullyQualifiedFormat.WithMiscellaneousOptions( 30private static readonly SymbolDisplayFormat _genericTypeSymbolFormat = 31SymbolDisplayFormat.FullyQualifiedFormat.WithMiscellaneousOptions(
Microsoft.Interop.JavaScript.JSImportGenerator (3)
JSManagedTypeInfo.cs (1)
16string fullTypeName = type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
JSSignatureContext.cs (2)
14private static SymbolDisplayFormat TypeAndContainingTypesStyle { get; } = new SymbolDisplayFormat( 19private static SymbolDisplayFormat TypeContainingTypesAndNamespacesStyle { get; } = new SymbolDisplayFormat(
Microsoft.Interop.SourceGeneration (2)
ManagedTypeInfo.cs (1)
42string typeName = type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
TypeSymbolExtensions.cs (1)
172return SyntaxFactory.ParseTypeName(type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
Microsoft.VisualStudio.LanguageServices (27)
CallHierarchy\CallHierarchyItem.cs (3)
53public static readonly SymbolDisplayFormat MemberNameFormat = 67public static readonly SymbolDisplayFormat ContainingTypeFormat = 75public static readonly SymbolDisplayFormat ContainingNamespaceFormat =
ChangeSignature\AddParameterDialogViewModel.cs (1)
52private static readonly SymbolDisplayFormat s_symbolDisplayFormat = new(
ChangeSignature\ChangeSignatureDialogViewModel.cs (2)
289private static readonly SymbolDisplayFormat s_symbolDeclarationDisplayFormat = new( 303private static readonly SymbolDisplayFormat s_parameterDisplayFormat = new(
F1Help\AbstractHelpContextService.cs (3)
20protected static readonly SymbolDisplayFormat TypeFormat = 28protected static readonly SymbolDisplayFormat SpecialTypeFormat = 37protected static readonly SymbolDisplayFormat NameFormat =
Implementation\ContainedLanguageRefactorNotifyService.cs (1)
25private static readonly SymbolDisplayFormat s_qualifiedDisplayFormat = new(
Library\AbstractLibraryService.cs (4)
19public SymbolDisplayFormat TypeDisplayFormat { get; } 20public SymbolDisplayFormat MemberDisplayFormat { get; } 27SymbolDisplayFormat typeDisplayFormat, 28SymbolDisplayFormat memberDisplayFormat)
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (2)
25private static readonly SymbolDisplayFormat s_typeDisplay = new( 115var typeDisplayFormat = new SymbolDisplayFormat(
Library\ObjectBrowser\AbstractListItemFactory.cs (7)
25private static readonly SymbolDisplayFormat s_searchFormat = 28private static readonly SymbolDisplayFormat s_simplePredefinedTypeDisplay = 32private static readonly SymbolDisplayFormat s_simpleNormalTypeDisplay = 38private static readonly SymbolDisplayFormat s_simplePredefinedTypeFullName = 42private static readonly SymbolDisplayFormat s_simpleNormalTypeFullName = 48private static readonly SymbolDisplayFormat s_predefinedTypeDisplay = 52private static readonly SymbolDisplayFormat s_normalTypeDisplay =
Library\ObjectBrowser\Extensions.cs (2)
18private static readonly SymbolDisplayFormat s_typeDisplayFormat = new( 22private static readonly SymbolDisplayFormat s_memberDisplayFormat = new(
Utilities\SymbolViewModel.cs (2)
20private static readonly SymbolDisplayFormat s_symbolDisplayFormat = new( 26private static readonly SymbolDisplayFormat s_symbolAutomationFormat = new(
Microsoft.VisualStudio.LanguageServices.CSharp (16)
CodeModel\CSharpCodeModelService.cs (5)
57private static readonly SymbolDisplayFormat s_codeTypeRefAsFullNameFormat = 63private static readonly SymbolDisplayFormat s_codeTypeRefAsStringFormat = 69private static readonly SymbolDisplayFormat s_externalNameFormat = 74private static readonly SymbolDisplayFormat s_externalFullNameFormat = 82private static readonly SymbolDisplayFormat s_setTypeFormat =
ObjectBrowser\CSharpLibraryService.cs (2)
19private static readonly SymbolDisplayFormat s_typeDisplayFormat = new( 23private static readonly SymbolDisplayFormat s_memberDisplayFormat = new(
ObjectBrowser\DescriptionBuilder.cs (3)
49var typeNameFormat = new SymbolDisplayFormat( 92var typeNameFormat = new SymbolDisplayFormat( 220var methodNameFormat = new SymbolDisplayFormat(
ObjectBrowser\ListItemFactory.cs (2)
14private static readonly SymbolDisplayFormat s_memberDisplayFormat = 22private static readonly SymbolDisplayFormat s_memberWithContainingTypeDisplayFormat =
Progression\CSharpProgressionLanguageService.cs (3)
24private static readonly SymbolDisplayFormat s_descriptionFormat = new( 35private static readonly SymbolDisplayFormat s_labelFormat = new( 94private static string GetSymbolText(ISymbol symbol, bool includeContainingSymbol, SymbolDisplayFormat displayFormat)
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (1)
137var entryPointNames = entryPoints.Select(e => e.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted))).ToArray();
Microsoft.VisualStudio.LanguageServices.VisualBasic (15)
CodeModel\VisualBasicCodeModelService.vb (6)
58Private Shared ReadOnly s_codeTypeRefAsFullNameFormat As SymbolDisplayFormat = 64Private Shared ReadOnly s_codeTypeRefAsStringFormat As SymbolDisplayFormat = 70Private Shared ReadOnly s_externalNameFormat As SymbolDisplayFormat = 76Private Shared ReadOnly s_externalfullNameFormat As SymbolDisplayFormat = 84Private Shared ReadOnly s_setTypeFormat As SymbolDisplayFormat = 90Private Shared ReadOnly s_raiseEventSignatureFormat As SymbolDisplayFormat =
CodeModel\VisualBasicCodeModelService_Prototype.vb (2)
17Private Shared ReadOnly s_prototypeFullNameFormat As SymbolDisplayFormat = 24Private Shared ReadOnly s_prototypeTypeNameFormat As SymbolDisplayFormat =
ObjectBrowser\ListItemFactory.vb (2)
12Private Shared ReadOnly s_memberDisplayFormat As SymbolDisplayFormat = 20Private Shared ReadOnly s_memberWithContainingTypeDisplayFormat As SymbolDisplayFormat =
ObjectBrowser\VisualBasicLibraryService.vb (1)
20Private Shared ReadOnly s_memberDisplayFormat As SymbolDisplayFormat =
Progression\VisualBasicProgressionLanguageService.vb (3)
59Private Shared ReadOnly s_descriptionFormat As SymbolDisplayFormat = New SymbolDisplayFormat( 71Private Shared ReadOnly s_labelFormat As SymbolDisplayFormat = New SymbolDisplayFormat( 81Private Shared Function GetSymbolText(symbol As ISymbol, includeContainingSymbol As Boolean, displayFormat As SymbolDisplayFormat) As String
ProjectSystemShim\VisualBasicProject.vb (1)
229Dim names = entryPoints.Select(Function(p) p.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat _
System.Text.Json.SourceGeneration (2)
JsonSourceGenerator.Parser.cs (1)
197string typeName = typeSymbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat);
src\libraries\Common\src\SourceGenerators\TypeModelHelper.cs (1)
38public static string GetFullyQualifiedName(this ITypeSymbol type) => type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
System.Text.RegularExpressions.Generator (1)
RegexGenerator.Parser.cs (1)
203SymbolDisplayFormat.FullyQualifiedFormat.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted));