423 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 (145)
SymbolDisplay\SymbolDisplayTests.cs (143)
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(
2104var format = new SymbolDisplayFormat(
2142var format = new SymbolDisplayFormat(
2176var format = new SymbolDisplayFormat(
2278var format = new SymbolDisplayFormat(
2315var format = new SymbolDisplayFormat(
2368var format = new SymbolDisplayFormat(
2403var format = new SymbolDisplayFormat(
2440var format = new SymbolDisplayFormat(
2477var format = new SymbolDisplayFormat(
2503var format = new SymbolDisplayFormat(
2533var format = new SymbolDisplayFormat(
2561var format = new SymbolDisplayFormat(
2652var format = new SymbolDisplayFormat(
2713var format = new SymbolDisplayFormat(
2757var format = new SymbolDisplayFormat(
2805var format = new SymbolDisplayFormat(
2838var format = new SymbolDisplayFormat(
2869var format = new SymbolDisplayFormat(
2903var format = new SymbolDisplayFormat(
2962var format = new SymbolDisplayFormat();
3163new SymbolDisplayFormat(
3206new SymbolDisplayFormat(),
3211new SymbolDisplayFormat(miscellaneousOptions: SymbolDisplayMiscellaneousOptions.RemoveAttributeSuffix),
3229new SymbolDisplayFormat(),
3234new SymbolDisplayFormat(miscellaneousOptions: SymbolDisplayMiscellaneousOptions.RemoveAttributeSuffix),
3250new SymbolDisplayFormat(),
3255new SymbolDisplayFormat(miscellaneousOptions: SymbolDisplayMiscellaneousOptions.RemoveAttributeSuffix),
3644var format = new SymbolDisplayFormat(globalNamespaceStyle: SymbolDisplayFormat.CSharpErrorMessageFormat.GlobalNamespaceStyle,
3663format = new SymbolDisplayFormat(parameterOptions: SymbolDisplayParameterOptions.IncludeName | SymbolDisplayParameterOptions.IncludeType,
3699new SymbolDisplayFormat(
3753new SymbolDisplayFormat(
3805new SymbolDisplayFormat(
3853new SymbolDisplayFormat(
3934new SymbolDisplayFormat(
4008new SymbolDisplayFormat(
4120new SymbolDisplayFormat(
4230new SymbolDisplayFormat(
4334new SymbolDisplayFormat(
4438var format = new SymbolDisplayFormat(
4482var format = new SymbolDisplayFormat(
4529var format = new SymbolDisplayFormat(
4571var format = new SymbolDisplayFormat(
4606var format = new SymbolDisplayFormat(
4654var format = new SymbolDisplayFormat(
4695var format = new SymbolDisplayFormat(
4764var normalFormat = new SymbolDisplayFormat();
4840var format = new SymbolDisplayFormat(
4874var format = new SymbolDisplayFormat(
4928var memberFormat = new SymbolDisplayFormat(
4932var typeFormat = new SymbolDisplayFormat(
4936var namespaceFormat = new SymbolDisplayFormat(
5118var memberFormat = new SymbolDisplayFormat(
5284var format = new SymbolDisplayFormat(
5313var f1 = new SymbolDisplayFormat();
5314var f2 = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeParameters);
5327Assert.False(new FormattedSymbol(sA, new SymbolDisplayFormat()).Equals(new FormattedSymbol(sA, new SymbolDisplayFormat())));
5346var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType);
5378var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, miscellaneousOptions: SymbolDisplayMiscellaneousOptions.CollapseTupleTypes);
5409var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType,
5440var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType);
5477var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType,
5528var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType,
5574var format = new SymbolDisplayFormat(
5673var formatBase = new SymbolDisplayFormat(
5877var formatBase = new SymbolDisplayFormat(
6094var formatWithoutNonNullableModifier = new SymbolDisplayFormat(
6166var formatWithoutNullableModifier = new SymbolDisplayFormat(
6235var formatWithoutModifiers = new SymbolDisplayFormat(
6354var formatWithoutModifiers = new SymbolDisplayFormat(
6393var format = new SymbolDisplayFormat(
6516var formatWithoutLongHandValueTuple = new SymbolDisplayFormat(
6629SymbolDisplayFormat changeSignatureFormat = new SymbolDisplayFormat(
7929new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType),
7945new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType),
7962new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType),
7978new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType),
7989var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType);
8029new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType),
8039var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType);
8129var formatWithoutOptions = new SymbolDisplayFormat(
8209var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword);
8230var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword);
8251var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword);
8274var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword);
8303var format = new SymbolDisplayFormat();
8324var format = new SymbolDisplayFormat();
8345var format = new SymbolDisplayFormat();
8366var format = new SymbolDisplayFormat();
8375private static readonly SymbolDisplayFormat s_fullDelegateFormat = new SymbolDisplayFormat(
8821var formatMinimal = new SymbolDisplayFormat();
8961var ideFormat = new SymbolDisplayFormat(
9029var format = new SymbolDisplayFormat(
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Simplification\CSharpSimplificationService.Expander.cs (1)
36new(
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (2)
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\GenerateFromMembersHelpers.cs (1)
117new(
Shared\Extensions\ISymbolExtensions_2.cs (1)
237new(
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 (115)
SymbolDisplay\SymbolDisplayTests.vb (115)
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(
6010Dim format = 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)
1522 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 (138)
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 (328)
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 (250)
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(
2066var format = new SymbolDisplayFormat(
2104var format = new SymbolDisplayFormat(
2142var format = new SymbolDisplayFormat(
2176var format = new SymbolDisplayFormat(
2212var format = new SymbolDisplayFormat(
2248var format = new SymbolDisplayFormat(
2278var format = new SymbolDisplayFormat(
2315var format = new SymbolDisplayFormat(
2368var format = new SymbolDisplayFormat(
2403var format = new SymbolDisplayFormat(
2440var format = new SymbolDisplayFormat(
2477var format = new SymbolDisplayFormat(
2503var format = new SymbolDisplayFormat(
2533var format = new SymbolDisplayFormat(
2561var format = new SymbolDisplayFormat(
2652var format = new SymbolDisplayFormat(
2713var format = new SymbolDisplayFormat(
2757var format = new SymbolDisplayFormat(
2805var format = new SymbolDisplayFormat(
2838var format = new SymbolDisplayFormat(
2869var format = new SymbolDisplayFormat(
2903var format = new SymbolDisplayFormat(
2934var format = SymbolDisplayFormat.MinimallyQualifiedFormat;
2962var format = new SymbolDisplayFormat();
3162private static readonly SymbolDisplayFormat s_memberSignatureDisplayFormat =
3274var format = SymbolDisplayFormat.MinimallyQualifiedFormat;
3304var format = new SymbolDisplayFormat(
3433var format = new SymbolDisplayFormat(
3494var format = new SymbolDisplayFormat(
3555var format = new SymbolDisplayFormat(
3582SymbolDisplayFormat format,
3604SymbolDisplayFormat format,
3614SymbolDisplayFormat format,
3644var format = new SymbolDisplayFormat(globalNamespaceStyle: SymbolDisplayFormat.CSharpErrorMessageFormat.GlobalNamespaceStyle,
3645typeQualificationStyle: SymbolDisplayFormat.CSharpErrorMessageFormat.TypeQualificationStyle,
3646genericsOptions: SymbolDisplayFormat.CSharpErrorMessageFormat.GenericsOptions,
3647memberOptions: SymbolDisplayFormat.CSharpErrorMessageFormat.MemberOptions,
3648parameterOptions: SymbolDisplayFormat.CSharpErrorMessageFormat.ParameterOptions,
3649propertyStyle: SymbolDisplayFormat.CSharpErrorMessageFormat.PropertyStyle,
3650localOptions: SymbolDisplayFormat.CSharpErrorMessageFormat.LocalOptions,
3653miscellaneousOptions: SymbolDisplayFormat.CSharpErrorMessageFormat.MiscellaneousOptions);
3665miscellaneousOptions: SymbolDisplayFormat.CSharpErrorMessageFormat.MiscellaneousOptions);
3698var format =
3752var format =
3804var format =
3852var format =
3933var format =
4007var format =
4119var format =
4229var format =
4333var format =
4438var format = new SymbolDisplayFormat(
4482var format = new SymbolDisplayFormat(
4529var format = new SymbolDisplayFormat(
4571var format = new SymbolDisplayFormat(
4606var format = new SymbolDisplayFormat(
4654var format = new SymbolDisplayFormat(
4695var format = new SymbolDisplayFormat(
4764var normalFormat = new SymbolDisplayFormat();
4765var reverseFormat = new SymbolDisplayFormat(
4840var format = new SymbolDisplayFormat(
4874var format = new SymbolDisplayFormat(
4928var memberFormat = new SymbolDisplayFormat(
4932var typeFormat = new SymbolDisplayFormat(
4936var namespaceFormat = new SymbolDisplayFormat(
5057Assert.Equal("Outer.Inner<T>", CSharp.SymbolDisplay.ToDisplayString(type, SymbolDisplayFormat.TestFormat));
5058Assert.Equal("void Outer.M<U>()", CSharp.SymbolDisplay.ToDisplayString(method, SymbolDisplayFormat.TestFormat));
5059Assert.Equal("System.String Outer.P { set; }", CSharp.SymbolDisplay.ToDisplayString(property, SymbolDisplayFormat.TestFormat));
5060Assert.Equal("System.Int32 Outer.F", CSharp.SymbolDisplay.ToDisplayString(field, SymbolDisplayFormat.TestFormat));
5061Assert.Equal("event Outer.EEventHandler Outer.E", CSharp.SymbolDisplay.ToDisplayString(@event, SymbolDisplayFormat.TestFormat));
5062Assert.Equal("Outer.D", CSharp.SymbolDisplay.ToDisplayString(@delegate, SymbolDisplayFormat.TestFormat));
5063Assert.Equal("Missing Outer.Error()", CSharp.SymbolDisplay.ToDisplayString(error, SymbolDisplayFormat.TestFormat));
5085Assert.Null(SymbolDisplay.FormatPrimitive(SymbolDisplayFormat.TestFormat, quoteStrings: false, useHexadecimalNumbers: false));
5118var memberFormat = new SymbolDisplayFormat(
5284var format = new SymbolDisplayFormat(
5313var f1 = new SymbolDisplayFormat();
5314var f2 = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeParameters);
5346var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType);
5378var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, miscellaneousOptions: SymbolDisplayMiscellaneousOptions.CollapseTupleTypes);
5409var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType,
5440var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType);
5477var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType,
5528var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType,
5574var format = new SymbolDisplayFormat(
5591SymbolDisplay.ToDisplayParts(symbol, SymbolDisplayFormat.MinimallyQualifiedFormat),
5629SymbolDisplay.ToDisplayParts(model.GetSymbolInfo(actualThis).Symbol, SymbolDisplayFormat.MinimallyQualifiedFormat),
5639SymbolDisplay.ToDisplayParts(model.GetSymbolInfo(escapedThis).Symbol, SymbolDisplayFormat.MinimallyQualifiedFormat),
5673var formatBase = new SymbolDisplayFormat(
5679var formatWithoutRef = formatBase.WithMemberOptions(
5681var formatWithRef = formatBase.WithMemberOptions(
5683var formatWithoutTypeWithRef = formatBase.WithMemberOptions(
5877var formatBase = new SymbolDisplayFormat(
5883var formatWithoutRef = formatBase.WithMemberOptions(
5885var formatWithRef = formatBase.WithMemberOptions(
5887var formatWithoutTypeWithRef = formatBase.WithMemberOptions(
6076var description = symbol.ToMinimalDisplayParts(model, position, SymbolDisplayFormat.MinimallyQualifiedFormat);
6094var formatWithoutNonNullableModifier = new SymbolDisplayFormat(
6100var formatWithNonNullableModifier = formatWithoutNonNullableModifier
6166var formatWithoutNullableModifier = new SymbolDisplayFormat(
6172var formatWithNullableModifier = formatWithoutNullableModifier
6235var formatWithoutModifiers = new SymbolDisplayFormat(
6238var formatWithNullableModifier = formatWithoutModifiers.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier);
6239var formatWithBothModifiers = formatWithNullableModifier.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier);
6321var formatWithoutAllowDefaultLiteral = SymbolDisplayFormat.MinimallyQualifiedFormat;
6323var formatWithAllowDefaultLiteral = formatWithoutAllowDefaultLiteral.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.AllowDefaultLiteral);
6354var formatWithoutModifiers = new SymbolDisplayFormat(
6359var formatWithNullableModifier = formatWithoutModifiers.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier);
6360var formatWithBothModifiers = formatWithNullableModifier.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier);
6393var format = new SymbolDisplayFormat(
6448var formatWithoutAllowDefaultLiteral = SymbolDisplayFormat.MinimallyQualifiedFormat;
6450var formatWithAllowDefaultLiteral = formatWithoutAllowDefaultLiteral.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.AllowDefaultLiteral);
6492var formatWithoutAllowDefaultLiteral = SymbolDisplayFormat.MinimallyQualifiedFormat;
6494var formatWithAllowDefaultLiteral = formatWithoutAllowDefaultLiteral.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.AllowDefaultLiteral);
6516var formatWithoutLongHandValueTuple = new SymbolDisplayFormat(
6522var formatWithLongHandValueTuple = formatWithoutLongHandValueTuple.AddMiscellaneousOptions(
6616Verify(localSymbol.ToDisplayParts(SymbolDisplayFormat.TestFormat),
6629SymbolDisplayFormat changeSignatureFormat = new SymbolDisplayFormat(
6694Verify(localSymbol.ToDisplayParts(SymbolDisplayFormat.TestFormat),
6755SymbolDisplayFormat.MinimallyQualifiedFormat),
6788Verify(localSymbol.ToDisplayParts(SymbolDisplayFormat.TestFormat),
6849SymbolDisplayFormat.MinimallyQualifiedFormat.AddLocalOptions(SymbolDisplayLocalOptions.IncludeRef)),
6882SymbolDisplayFormat.MinimallyQualifiedFormat.AddLocalOptions(SymbolDisplayLocalOptions.IncludeRef)),
6894SymbolDisplayFormat.MinimallyQualifiedFormat),
6927SymbolDisplayFormat.MinimallyQualifiedFormat.AddLocalOptions(SymbolDisplayLocalOptions.IncludeRef)),
6941SymbolDisplayFormat.MinimallyQualifiedFormat),
7013SymbolDisplayFormat.MinimallyQualifiedFormat
7042var format = SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword);
7080var format = SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword);
7118var format = SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword);
7155var format = SymbolDisplayFormat.TestFormat
7240var format = SymbolDisplayFormat.TestFormat
7500var format = SymbolDisplayFormat.TestFormat
7653var format = SymbolDisplayFormat.TestFormat
7689var format = SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword);
7704SymbolDisplayFormat.TestFormat.WithGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeParameters | SymbolDisplayGenericsOptions.IncludeTypeConstraints),
7728SymbolDisplayFormat.TestFormat,
7741SymbolDisplayFormat.TestFormat.WithGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeParameters | SymbolDisplayGenericsOptions.IncludeTypeConstraints),
7765SymbolDisplayFormat.TestFormat,
7778SymbolDisplayFormat.TestFormat.WithGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeParameters | SymbolDisplayGenericsOptions.IncludeTypeConstraints),
7802SymbolDisplayFormat.TestFormat,
7815SymbolDisplayFormat.TestFormat.AddGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeConstraints),
7840SymbolDisplayFormat.TestFormat.AddGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeConstraints),
7873SymbolDisplayFormat.TestFormat.AddGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeConstraints),
7989var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType);
8039var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeContainingType);
8129var formatWithoutOptions = new SymbolDisplayFormat(
8133var formatWithUnderlyingTypes = formatWithoutOptions.WithCompilerInternalOptions(SymbolDisplayCompilerInternalOptions.UseNativeIntegerUnderlyingType);
8209var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword);
8230var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword);
8251var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword);
8274var format = new SymbolDisplayFormat(memberOptions: SymbolDisplayMemberOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeTypeKeyword);
8303var format = new SymbolDisplayFormat();
8324var format = new SymbolDisplayFormat();
8345var format = new SymbolDisplayFormat();
8366var format = new SymbolDisplayFormat();
8375private static readonly SymbolDisplayFormat s_fullDelegateFormat = new SymbolDisplayFormat(
8546var format = s_memberSignatureDisplayFormat.RemoveParameterOptions(SymbolDisplayParameterOptions.IncludeName);
8560Verify(methodSymbol.ToDisplayParts(SymbolDisplayFormat.CSharpErrorMessageFormat), "C.M(ref int)",
8570Verify(methodSymbol.ToDisplayParts(SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat), "C.M(ref int)",
8587Verify(parameterSymbol.ToDisplayParts(SymbolDisplayFormat.CSharpErrorMessageFormat), "ref int p",
8594Verify(parameterSymbol.ToDisplayParts(SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat), "ref int",
8655Verify(comp.GetMember<FieldSymbol>("S.F1").ToDisplayParts(SymbolDisplayFormat.TestFormat),
8668Verify(comp.GetMember<FieldSymbol>("S.F2").ToDisplayParts(SymbolDisplayFormat.TestFormat),
8698var formatTypeOnly = SymbolDisplayFormat.TestFormat.WithParameterOptions(SymbolDisplayParameterOptions.IncludeType | SymbolDisplayParameterOptions.IncludeName);
8699var formatTypeRefAndScoped = formatTypeOnly.AddParameterOptions(SymbolDisplayParameterOptions.IncludeParamsRefOut);
8782var formatTypeOnly = s_fullDelegateFormat.WithParameterOptions(SymbolDisplayParameterOptions.IncludeType | SymbolDisplayParameterOptions.IncludeName);
8783var formatTypeRefAndScoped = formatTypeOnly.AddParameterOptions(SymbolDisplayParameterOptions.IncludeParamsRefOut);
8821var formatMinimal = new SymbolDisplayFormat();
8822var formatTypeRefAndScoped = s_fullDelegateFormat.
8847var format = SymbolDisplayFormat.TestFormat.
8878var formatTypeOnly = SymbolDisplayFormat.TestFormat.WithLocalOptions(SymbolDisplayLocalOptions.IncludeType);
8879var formatTypeRefAndScoped = formatTypeOnly.AddLocalOptions(SymbolDisplayLocalOptions.IncludeRef);
8935Verify(op.ToDisplayParts(SymbolDisplayFormat.TestFormat),
8961var ideFormat = new SymbolDisplayFormat(
9029var format = 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 (2)
Microsoft.CodeAnalysis.Features (73)
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 (112)
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\ObsoleteAttributeHelpers.vb (3)
145Return ErrorFactory.ErrorInfo(ERRID.WRN_Experimental, New FormattedSymbol(symbol, SymbolDisplayFormat.VisualBasicErrorMessageFormat), "", "")
152Return New CustomObsoleteDiagnosticInfo(MessageProvider.Instance, ERRID.WRN_Experimental, data, New FormattedSymbol(symbol, SymbolDisplayFormat.VisualBasicErrorMessageFormat))
154Return New CustomObsoleteDiagnosticInfo(MessageProvider.Instance, ERRID.WRN_ExperimentalWithMessage, data, New FormattedSymbol(symbol, SymbolDisplayFormat.VisualBasicErrorMessageFormat),
Symbols\Symbol.vb (10)
861Return ToDisplayString(SymbolDisplayFormat.VisualBasicErrorMessageFormat)
864Public Function ToDisplayString(Optional format As SymbolDisplayFormat = Nothing) As String
868Public Function ToDisplayParts(Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart)
872Public Function ToMinimalDisplayString(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String
876Public Function ToMinimalDisplayParts(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart)
881Return String.Format("{0} {1}", Me.Kind, Me.ToDisplayString(SymbolDisplayFormat.TestFormat))
1325Private Function ISymbol_ToDisplayString(Optional format As SymbolDisplayFormat = Nothing) As String Implements ISymbol.ToDisplayString
1329Private Function ISymbol_ToDisplayParts(Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) Implements ISymbol.ToDisplayParts
1333Private Function ISymbol_ToMinimalDisplayString(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String Implements ISymbol.ToMinimalDisplayString
1337Private 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),
6040format As SymbolDisplayFormat,
6084format 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.Maui.Controls.BindingSourceGen (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)