418 instantiations of SymbolDisplayFormat
ConfigurationSchemaGenerator (2)
ILLink.RoslynAnalyzer (2)
Microsoft.Analyzers.Local (4)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
Microsoft.CodeAnalysis (22)
Microsoft.CodeAnalysis.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolDisplayFormats.cs (2)
16new(
35new(
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
Microsoft.CodeAnalysis.CSharp (3)
Microsoft.CodeAnalysis.CSharp.Features (5)
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
30new(
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
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(
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Simplification\CSharpSimplificationService.Expander.cs (1)
36new(
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.Features (27)
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (1)
19new(
Debugging\AbstractBreakpointResolver.cs (1)
38new(
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
38new(
55new(
FindUsages\FindUsagesHelpers.cs (1)
60new(
GenerateFromMembers\AbstractGenerateFromMembersCodeRefactoringProvider.cs (1)
122new(
Shared\Extensions\ISymbolExtensions_2.cs (1)
234new(
Microsoft.CodeAnalysis.VisualBasic (5)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (1)
Microsoft.CodeAnalysis.VisualBasic.Features (7)
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)
Microsoft.CodeAnalysis.Workspaces (5)
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (1)
263new(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolDisplayFormats.cs (2)
16new(
35new(
Microsoft.DotNet.CodeAnalysis (1)
Microsoft.Interop.JavaScript.JSImportGenerator (2)
Microsoft.VisualStudio.LanguageServices (23)
Microsoft.VisualStudio.LanguageServices.CSharp (14)
Microsoft.VisualStudio.LanguageServices.VisualBasic (20)
1512 references to SymbolDisplayFormat
ConfigurationSchemaGenerator (3)
ILLink.RoslynAnalyzer (2)
Microsoft.Analyzers.Local (5)
Microsoft.AspNetCore.Analyzers (1)
Microsoft.AspNetCore.Analyzers.Test (1)
Microsoft.AspNetCore.Components.Analyzers (12)
Microsoft.AspNetCore.Components.SdkAnalyzers (11)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (32)
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)
Microsoft.CodeAnalysis (64)
Microsoft.CodeAnalysis.CodeStyle (6)
Microsoft.CodeAnalysis.CodeStyle.Fixes (14)
Microsoft.CodeAnalysis.CSharp (137)
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)
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,
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));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
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));
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)
Microsoft.CodeAnalysis.CSharp.Features (35)
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)));
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\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\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)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.Features (74)
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)
Microsoft.CodeAnalysis.Test.Utilities (8)
Microsoft.CodeAnalysis.VisualBasic (111)
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,
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
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (24)
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))
Microsoft.CodeAnalysis.VisualBasic.Features (28)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (53)
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\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))
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\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\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)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Microsoft.CodeAnalysis.Workspaces (13)
Microsoft.DotNet.CodeAnalysis (1)
Microsoft.Extensions.Logging.Generators (1)
Microsoft.Extensions.Options.SourceGeneration (12)
Microsoft.Gen.ComplianceReports (1)
Microsoft.Gen.Logging (4)
Microsoft.Gen.Logging.Unit.Tests (1)
Microsoft.Gen.Metrics (4)
Microsoft.Gen.MetricsReports (4)
Microsoft.Interop.JavaScript.JSImportGenerator (3)
Microsoft.Interop.SourceGeneration (2)
Microsoft.VisualStudio.LanguageServices (27)
Microsoft.VisualStudio.LanguageServices.CSharp (16)
Microsoft.VisualStudio.LanguageServices.VisualBasic (15)
System.Text.Json.SourceGeneration (2)
System.Text.RegularExpressions.Generator (1)