609 references to ToDisplayString
Microsoft.CodeAnalysis.CSharp (64)
Binder\Binder.cs (1)
933
sub.Add(new TreeDumperNode("containing symbol", currentContainer.
ToDisplayString
(), null));
Binder\Binder_Attributes.cs (2)
254
Error(diagnostics, ErrorCode.ERR_AttributeCtorInParameter, node, attributeConstructor.
ToDisplayString
(SymbolDisplayFormat.CSharpErrorMessageFormat));
964
Binder.Error(diagnostics, ErrorCode.ERR_AttrArgWithTypeVars, node.Syntax, typeOfArgument.
ToDisplayString
(SymbolDisplayFormat.CSharpErrorMessageFormat));
Binder\Binder_Expressions.cs (1)
10145
properties[0].
ToDisplayString
(s_propertyGroupFormat));
Binder\Binder_Patterns.cs (2)
1347
diagnostics.Add(ErrorCode.ERR_VarMayNotBindToType, node.VarKeyword.GetLocation(), foundSymbol.
ToDisplayString
());
1670
diagnostics.Add(ErrorCode.ERR_UnsupportedTypeForRelationalPattern, node.Location, type.
ToDisplayString
());
Binder\Binder_Symbols.cs (1)
2786
var fullMetadataName = MetadataHelpers.BuildQualifiedName(qualifierOpt?.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameOnlyFormat), metadataName);
Binder\PatternExplainer.cs (10)
364
return !sense ? "null" : requireExactType ? input.Type.
ToDisplayString
() : "not null";
366
return sense ? "null" : requireExactType ? input.Type.
ToDisplayString
() : "not null";
369
return testedType.
ToDisplayString
();
623
string typeName = requireExactType ? input.Type.
ToDisplayString
() : null;
633
return requireExactType ? input.Type.
ToDisplayString
() : "_";
697
return field.
ToDisplayString
();
717
return $"> ({type.
ToDisplayString
()})int.MaxValue";
720
return $"< ({type.
ToDisplayString
()})int.MinValue";
725
return $"> ({type.
ToDisplayString
()})uint.MaxValue";
736
return requiresCast ? $"({type.
ToDisplayString
()}){valueString}" : valueString;
Binder\Semantics\Conversions\Conversion.cs (1)
1228
sub.Add(new TreeDumperNode("method", self.Method.
ToDisplayString
(), null));
Binder\Semantics\Operators\BinaryOperatorAnalysisResult.cs (1)
72
return $"{Signature.Kind} {Kind} {Signature.Method?.
ToDisplayString
()}";
Binder\Semantics\Operators\UnaryOperatorAnalysisResult.cs (1)
56
return $"{Signature.Kind} {Kind} {Signature.Method?.
ToDisplayString
()}";
BoundTree\TupleBinaryOperatorInfo.cs (3)
88
sub.Add(new TreeDumperNode("methodSymbolOpt", MethodSymbolOpt.
ToDisplayString
(), null));
90
sub.Add(new TreeDumperNode("leftConversion", LeftConvertedTypeOpt?.
ToDisplayString
(), null));
91
sub.Add(new TreeDumperNode("rightConversion", RightConvertedTypeOpt?.
ToDisplayString
(), null));
BoundTree\UnboundLambda.cs (1)
1327
builder.Builder.Append(parameter.
ToDisplayString
(SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat));
Compilation\CSharpCompilation.cs (6)
1764
Debug.Fail($"Unsupported type argument: {typeArgument.
ToDisplayString
()}");
4557
throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps2, $"{csharpReturnType.
ToDisplayString
()} operator {name}({csharpLeftType.
ToDisplayString
()}, {csharpRightType.
ToDisplayString
()})"));
4639
throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps2, $"{csharpReturnType.
ToDisplayString
()} operator {name}({csharpOperandType.
ToDisplayString
()})"));
Emitter\EditAndContinue\EmitHelpers.cs (1)
175
string.Format(CodeAnalysisResources.Type0DoesNotHaveExpectedConstructor, type.
ToDisplayString
(SymbolDisplayFormat.CSharpErrorMessageFormat)));
Emitter\Model\FunctionPointerTypeSymbolAdapter.cs (1)
92
public override string ToString() => _underlying.
ToDisplayString
(SymbolDisplayFormat.ILVisualizationFormat);
Emitter\Model\NamedTypeReference.cs (1)
152
return UnderlyingNamedType.
ToDisplayString
(SymbolDisplayFormat.ILVisualizationFormat);
Emitter\Model\ParameterTypeInformation.cs (1)
66
return _underlyingParameter.
ToDisplayString
(SymbolDisplayFormat.ILVisualizationFormat);
Emitter\Model\PEModuleBuilder.cs (1)
807
orderedForwardedTypes = orderedForwardedTypes.OrderBy(t => t.OriginalDefinition.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameArityFormat));
Emitter\Model\TypeMemberReference.cs (1)
37
return UnderlyingSymbol.
ToDisplayString
(SymbolDisplayFormat.ILVisualizationFormat);
Emitter\NoPia\EmbeddedType.cs (1)
281
UnderlyingNamedType.AdaptedNamedTypeSymbol.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameOnlyFormat))),
Emitter\NoPia\EmbeddedTypesManager.cs (1)
502
Error(diagnostics, ErrorCode.ERR_InteropMethodWithBody, syntaxNodeOpt, method.AdaptedMethodSymbol.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat));
FlowAnalysis\NullableWalker.cs (3)
1973
RoslynDebug.Assert(AreCloseEnough(originalSymbol, updatedSymbol), $"Attempting to set {node.Syntax} from {originalSymbol.
ToDisplayString
()} to {updatedSymbol.
ToDisplayString
()}");
8806
Debug.Assert(!symbol.IsExtensionBlockMember(), symbol.
ToDisplayString
());
FlowAnalysis\NullableWalker.SnapshotManager.cs (3)
125
var debugText = expr?.Syntax.ToFullString() ?? originalSymbol.
ToDisplayString
();
130
Was {originalSymbol.
ToDisplayString
(SymbolDisplayFormat.FullyQualifiedFormat)}
131
Now {updatedSymbol.
ToDisplayString
(SymbolDisplayFormat.FullyQualifiedFormat)}");
Symbols\Attributes\AttributeData.cs (1)
137
string className = this.AttributeClass.
ToDisplayString
(SymbolDisplayFormat.TestFormat);
Symbols\NamespaceOrTypeSymbol.cs (1)
273
Debug.Assert(!isTopLevel || scope.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameOnlyFormat) == emittedTypeName.NamespaceName);
Symbols\NamespaceSymbol.cs (1)
376
(_lazyQualifiedName = this.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameOnlyFormat));
Symbols\Retargeting\RetargetingSymbolTranslator.cs (3)
338
MetadataTypeName name = MetadataTypeName.FromFullName(type.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameOnlyFormat), forcedArity: type.Arity);
430
string namespaceName = type.ContainingNamespace.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameOnlyFormat);
467
string namespaceName = type.ContainingNamespace.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameOnlyFormat);
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
73
string interfaceName = explicitInterfaceTypeOpt.
ToDisplayString
(SymbolDisplayFormat.ExplicitInterfaceImplementationFormat);
Symbols\Source\SourceAssemblySymbol.cs (2)
1096
y.
ToDisplayString
(SymbolDisplayFormat.ShortFormat),
2841
string fullEmittedName = MetadataHelpers.BuildQualifiedName(originalDefinition.ContainingSymbol.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameOnlyFormat),
Symbols\Source\SourceMemberContainerSymbol.cs (1)
280
var emittedName = ContainingSymbol.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameOnlyFormat);
Symbols\Symbol.cs (4)
849
/// This will provide a useful representation, but it would be clearer to call <see cref="
ToDisplayString
"/>
851
/// Sealed so that <see cref="ToString"/> and <see cref="
ToDisplayString
"/> can't get out of sync.
855
return this.
ToDisplayString
();
1028
return $"{this.Kind} {this.
ToDisplayString
(s_debuggerDisplayFormat)}";
Symbols\SymbolDistinguisher.cs (2)
89
string description0 = _symbol0.
ToDisplayString
(SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat);
90
string description1 = _symbol1.
ToDisplayString
(SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat);
Symbols\TypeSymbolExtensions.cs (1)
1792
return string.Equals(container.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameOnlyFormat), qualifiedName, comparison);
Symbols\TypeWithAnnotations.cs (3)
297
return DefaultType.
ToDisplayString
(format) + "?";
300
return DefaultType.
ToDisplayString
(format);
304
var str = !HasType ? "<null>" : Type.
ToDisplayString
(format);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (17)
CodeGen\CodeGenDynamicTests.cs (1)
655
Assert.Equal("System.Runtime.CompilerServices.DynamicAttribute", attributes[0].AttributeClass.
ToDisplayString
());
CodeGen\CodeGenScriptTests.cs (3)
499
Assert.Equal("System.Threading.Tasks.Task<object>", ((MethodSymbol)methodData.Method).ReturnType.
ToDisplayString
());
559
Assert.Equal("System.Threading.Tasks.Task<object>", ((MethodSymbol)methodData.Method).ReturnType.
ToDisplayString
());
587
Assert.Equal("System.Threading.Tasks.Task<object>", ((MethodSymbol)methodData.Method).ReturnType.
ToDisplayString
());
Emit\CompilationEmitTests.cs (13)
2137
compWithReal.SourceModule.GetReferencedAssemblySymbols().Last().GlobalNamespace.GetMembers().Select(m => m.
ToDisplayString
()));
2168
compWithReal2.SourceModule.GetReferencedAssemblySymbols().Last().GlobalNamespace.GetMembers().Select(m => m.
ToDisplayString
()));
2196
compWithMetadata.SourceModule.GetReferencedAssemblySymbols().Last().GlobalNamespace.GetMembers().Select(m => m.
ToDisplayString
()));
2225
compWithRef.SourceModule.GetReferencedAssemblySymbols().Last().GlobalNamespace.GetMembers().Select(m => m.
ToDisplayString
()));
2303
input.SourceModule.GetReferencedAssemblySymbols().Last().GlobalNamespace.GetMembers().Select(m => m.
ToDisplayString
()));
2370
input.SourceModule.GetReferencedAssemblySymbols().Last().GlobalNamespace.GetMembers().Select(m => m.
ToDisplayString
()));
2437
input.SourceModule.GetReferencedAssemblySymbols().Last().GlobalNamespace.GetMembers().Select(m => m.
ToDisplayString
()));
2472
globalNamespace.GetMembers().Select(m => m.
ToDisplayString
()));
2474
AssertEx.Equal(new[] { "Microsoft.CodeAnalysis" }, globalNamespace.GetMember<NamespaceSymbol>("Microsoft").GetMembers().Select(m => m.
ToDisplayString
()));
2477
globalNamespace.GetMember<NamespaceSymbol>("Microsoft.CodeAnalysis").GetMembers().Select(m => m.
ToDisplayString
()));
2481
globalNamespace.GetMember<NamespaceSymbol>("System.Runtime").GetMembers().Select(m => m.
ToDisplayString
()));
2484
globalNamespace.GetMember<NamespaceSymbol>("System.Runtime.CompilerServices").GetMembers().Select(m => m.
ToDisplayString
()));
2514
compWithRef.SourceModule.GetReferencedAssemblySymbols().Last().GlobalNamespace.GetMembers().Select(m => m.
ToDisplayString
()));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (31)
Emit\NumericIntPtrTests.cs (31)
575
var actualMembers = members.SelectAsArray(m => m.
ToDisplayString
(TestFormat));
9338
Assert.Equal("S<nint> I.F1()", type.GetMember("F1").
ToDisplayString
(TestFormat));
9339
Assert.Equal("S<nint> I.F2()", type.GetMember("F2").
ToDisplayString
(TestFormat));
9340
Assert.Equal("S<nint> I.F3()", type.GetMember("F3").
ToDisplayString
(TestFormat));
9341
Assert.Equal("S<nint> I.F4()", type.GetMember("F4").
ToDisplayString
(TestFormat));
9344
Assert.Equal("S<nint> C.I.F1()", type.GetMember("I.F1").
ToDisplayString
(TestFormat));
9345
Assert.Equal("S<nint> C.I.F2()", type.GetMember("I.F2").
ToDisplayString
(TestFormat));
9346
Assert.Equal("S<nint> C.I.F3()", type.GetMember("I.F3").
ToDisplayString
(TestFormat));
9347
Assert.Equal("S<nint> C.I.F4()", type.GetMember("I.F4").
ToDisplayString
(TestFormat));
9372
Assert.Equal("nint[] A.F1()", type.GetMember("F1").
ToDisplayString
(TestFormat));
9373
Assert.Equal("nint[] A.F2()", type.GetMember("F2").
ToDisplayString
(TestFormat));
9374
Assert.Equal("nint[] A.F3()", type.GetMember("F3").
ToDisplayString
(TestFormat));
9375
Assert.Equal("nint[] A.F4()", type.GetMember("F4").
ToDisplayString
(TestFormat));
9378
Assert.Equal("nint[] B.F1()", type.GetMember("F1").
ToDisplayString
(TestFormat));
9379
Assert.Equal("nint[] B.F2()", type.GetMember("F2").
ToDisplayString
(TestFormat));
9380
Assert.Equal("nint[] B.F3()", type.GetMember("F3").
ToDisplayString
(TestFormat));
9381
Assert.Equal("nint[] B.F4()", type.GetMember("F4").
ToDisplayString
(TestFormat));
10386
Assert.Equal("nint", type.
ToDisplayString
(TestFormat));
10387
Assert.Equal("nint", type.
ToDisplayString
(TestFormat));
10388
Assert.Equal("System.IntPtr", type.
ToDisplayString
(TestFormat.WithCompilerInternalOptions(SymbolDisplayCompilerInternalOptions.UseNativeIntegerUnderlyingType)));
10389
Assert.Equal("nint", type.
ToDisplayString
(TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes)));
10395
Assert.Equal("nuint", type.
ToDisplayString
(TestFormat));
10396
Assert.Equal("nuint", type.
ToDisplayString
(TestFormat));
10397
Assert.Equal("System.UIntPtr", type.
ToDisplayString
(TestFormat.WithCompilerInternalOptions(SymbolDisplayCompilerInternalOptions.UseNativeIntegerUnderlyingType)));
10398
Assert.Equal("nuint", type.
ToDisplayString
(TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes)));
10554
Assert.Equal("nint nint.op_Implicit(System.String s)", model.GetConversion(returnStatements[0].Expression).Method.
ToDisplayString
(TestFormat));
10555
Assert.Equal("nuint nuint.op_Implicit(System.String s)", model.GetConversion(returnStatements[1].Expression).Method.
ToDisplayString
(TestFormat));
10737
Assert.Equal("nint C.M()", m.
ToDisplayString
(TestFormat));
10936
Assert.Equal("nint", derivedNint.
ToDisplayString
(TestFormat));
10971
Assert.Equal("System.IntPtr", baseNint.
ToDisplayString
(TestFormat));
10972
Assert.Equal("nint", derivedNint.
ToDisplayString
(TestFormat));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (124)
Attributes\AttributeTests.cs (19)
1496
Assert.Equal("A.XAttribute", attrs.First().AttributeClass.
ToDisplayString
());
1607
Assert.Equal("System.CLSCompliantAttribute", attrs.First().AttributeClass.
ToDisplayString
());
3105
Assert.Equal("CustomAttribute.AttrName", attrs[0].AttributeClass.
ToDisplayString
());
3114
Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attrs[0].AttributeClass.
ToDisplayString
());
3266
Assert.Equal("X.AttrAttribute", attrs[0].AttributeClass.
ToDisplayString
());
3314
Assert.Equal("X.AttrAttribute", attrs[0].AttributeClass.
ToDisplayString
());
3366
Assert.Equal("Z.Attr", attrs[0].AttributeClass.
ToDisplayString
());
3418
Assert.Equal("Z.Attr", attrs[0].AttributeClass.
ToDisplayString
());
3796
Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attr.AttributeClass.
ToDisplayString
());
3802
Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attr.AttributeClass.
ToDisplayString
());
3808
Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attr.AttributeClass.
ToDisplayString
());
3810
Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attr.AttributeClass.
ToDisplayString
());
3817
Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attr.AttributeClass.
ToDisplayString
());
3831
Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attr.AttributeClass.
ToDisplayString
());
4012
Assert.Equal("AttributeTest.TestAttributeForMethod", attr.AttributeClass.
ToDisplayString
());
4018
Assert.Equal("AttributeTest.TestAttributeForParam", attr.AttributeClass.
ToDisplayString
());
4023
Assert.Equal("AttributeTest.TestAttributeForReturn", attr.AttributeClass.
ToDisplayString
());
4031
Assert.Equal("AttributeTest.TestAttributeForMethod", attr.AttributeClass.
ToDisplayString
());
4036
Assert.Equal("AttributeTest.TestAttributeForReturn", attr.AttributeClass.
ToDisplayString
());
Attributes\AttributeTests_IsByRefLike.cs (6)
675
Assert.Equal("System.ObsoleteAttribute", attribute.AttributeClass.
ToDisplayString
());
760
Assert.Equal("Windows.Foundation.Metadata.DeprecatedAttribute", attribute.AttributeClass.
ToDisplayString
());
813
Assert.Equal("Windows.Foundation.Metadata.DeprecatedAttribute", attributes[1].AttributeClass.
ToDisplayString
());
816
Assert.Equal("System.ObsoleteAttribute", attribute.AttributeClass.
ToDisplayString
());
1098
Assert.Equal(WellKnownTypes.GetMetadataName(WellKnownType.System_Runtime_CompilerServices_CompilerGeneratedAttribute), attributes[0].AttributeClass.
ToDisplayString
());
1099
Assert.Equal(AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName, attributes[1].AttributeClass.
ToDisplayString
());
Attributes\AttributeTests_NativeInteger.cs (20)
281
Assert.Equal("void B.F0( x, y)", type.GetMember("F0").
ToDisplayString
(FormatWithSpecialTypes));
282
Assert.Equal("void B.F1( a)", type.GetMember("F1").
ToDisplayString
(FormatWithSpecialTypes));
355
Assert.Equal("void B.F0(System.IntPtr x, System.UIntPtr y)", type.GetMember("F0").
ToDisplayString
(FormatWithSpecialTypes));
356
Assert.Equal("void B.F1(A<int, System.UIntPtr> a)", type.GetMember("F1").
ToDisplayString
(FormatWithSpecialTypes));
357
Assert.Equal("void B.F2(A<System.IntPtr, uint> a)", type.GetMember("F2").
ToDisplayString
(FormatWithSpecialTypes));
438
Assert.Equal("void B.F0(nint x, nuint y)", type.GetMember("F0").
ToDisplayString
(FormatWithSpecialTypes));
439
Assert.Equal("void B.F1(A<int, nuint> a)", type.GetMember("F1").
ToDisplayString
(FormatWithSpecialTypes));
440
Assert.Equal("void B.F2(A<nint, uint> a)", type.GetMember("F2").
ToDisplayString
(FormatWithSpecialTypes));
515
Assert.Equal("void B.F0(System.IntPtr x, System.UIntPtr y)", type.GetMember("F0").
ToDisplayString
(FormatWithSpecialTypes));
516
Assert.Equal("void B.F1(A<int, System.UIntPtr> a)", type.GetMember("F1").
ToDisplayString
(FormatWithSpecialTypes));
517
Assert.Equal("void B.F2(A<System.IntPtr, System.UIntPtr> a)", type.GetMember("F2").
ToDisplayString
(FormatWithSpecialTypes));
633
Assert.Equal("void B.F( a)", type.GetMember("F").
ToDisplayString
(FormatWithSpecialTypes));
634
Assert.Equal("void B.F0( a)", type.GetMember("F0").
ToDisplayString
(FormatWithSpecialTypes));
635
Assert.Equal("void B.F1( a)", type.GetMember("F1").
ToDisplayString
(FormatWithSpecialTypes));
636
Assert.Equal("void B.F2(A<System.IntPtr, nuint> a)", type.GetMember("F2").
ToDisplayString
(FormatWithSpecialTypes));
637
Assert.Equal("void B.F3( a)", type.GetMember("F3").
ToDisplayString
(FormatWithSpecialTypes));
741
Assert.Equal("void B.F1( w)", type.GetMember("F1").
ToDisplayString
(FormatWithSpecialTypes));
742
Assert.Equal("void B.F2( x)", type.GetMember("F2").
ToDisplayString
(FormatWithSpecialTypes));
743
Assert.Equal("void B.F3( y)", type.GetMember("F3").
ToDisplayString
(FormatWithSpecialTypes));
744
Assert.Equal("void B.F4( z)", type.GetMember("F4").
ToDisplayString
(FormatWithSpecialTypes));
Attributes\AttributeTests_ReadOnlyStruct.cs (2)
665
Assert.Equal(WellKnownTypes.GetMetadataName(WellKnownType.System_Runtime_CompilerServices_CompilerGeneratedAttribute), attributes[0].AttributeClass.
ToDisplayString
());
666
Assert.Equal(AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName, attributes[1].AttributeClass.
ToDisplayString
());
Attributes\AttributeTests_RefReadOnly.cs (2)
2557
Assert.Equal(WellKnownTypes.GetMetadataName(WellKnownType.System_Runtime_CompilerServices_CompilerGeneratedAttribute), attributes[0].AttributeClass.
ToDisplayString
());
2558
Assert.Equal(AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName, attributes[1].AttributeClass.
ToDisplayString
());
Attributes\AttributeTests_Tuples.cs (1)
300
.Select(s => s.
ToDisplayString
(SymbolDisplayFormat.FullyQualifiedFormat)));
FirstClassSpanTests.cs (1)
8891
return symbol.GetSymbol<MethodSymbol>()!.
ToDisplayString
(s_typeArgumentsDisplayFormat);
RefReadonlyParameterTests.cs (2)
6724
Assert.Equal("I.M(in int)", m1.ExplicitInterfaceImplementations.Single().
ToDisplayString
());
6731
Assert.Equal("I.M(ref readonly int)", m2.ExplicitInterfaceImplementations.Single().
ToDisplayString
());
RefStructInterfacesTests.cs (5)
4384
AssertEx.Equal("C<T> where T : allows ref struct", t.ContainingSymbol.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
5100
AssertEx.Equal("C<T> where T : new(), allows ref struct", t.ContainingSymbol.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
5124
AssertEx.Equal("C<T> where T : new(), allows ref struct", t.ContainingSymbol.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
5771
AssertEx.Equal("C<T>", t.ContainingSymbol.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
29431
AssertEx.Equal("void ITest29.M21<T1>() where T1 : allows ref struct", m21.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
Semantics\ExtensionOperatorsTests.cs (15)
450
AssertEx.Equal("Extensions1." + name + "(S1)", method.
ToDisplayString
());
489
AssertEx.Equal("Extensions1." + name + "(S1)", method.
ToDisplayString
());
521
AssertEx.Equal("Extensions1." + WellKnownMemberNames.TrueOperatorName + "(S1)", method.
ToDisplayString
());
525
AssertEx.Equal("Extensions1." + WellKnownMemberNames.FalseOperatorName + "(S1)", method.
ToDisplayString
());
4606
AssertEx.Equal("Extensions1." + name + "(ref S1)", method.
ToDisplayString
());
4642
AssertEx.Equal("Extensions1." + name + "(S1)", method.
ToDisplayString
());
4653
AssertEx.Equal("Extensions1." + name + "(S1)", method.
ToDisplayString
());
11320
AssertEx.Equal("Extensions1." + name + "(S1, S1)", method.
ToDisplayString
());
11367
AssertEx.Equal("Extensions1." + WellKnownMemberNames.EqualityOperatorName + "(S1, S1)", method.
ToDisplayString
());
11371
AssertEx.Equal("Extensions1." + WellKnownMemberNames.InequalityOperatorName + "(S1, S1)", method.
ToDisplayString
());
11375
AssertEx.Equal("Extensions1." + WellKnownMemberNames.GreaterThanOrEqualOperatorName + "(S1, S1)", method.
ToDisplayString
());
11379
AssertEx.Equal("Extensions1." + WellKnownMemberNames.LessThanOrEqualOperatorName + "(S1, S1)", method.
ToDisplayString
());
11383
AssertEx.Equal("Extensions1." + WellKnownMemberNames.GreaterThanOperatorName + "(S1, S1)", method.
ToDisplayString
());
11387
AssertEx.Equal("Extensions1." + WellKnownMemberNames.LessThanOperatorName + "(S1, S1)", method.
ToDisplayString
());
20289
AssertEx.Equal("Extensions1." + name + "(ref S1, int)", method.
ToDisplayString
());
Semantics\ExtensionTests.cs (6)
9146
AssertEx.Equal("Extensions.extension(object).M(object, string)", m1.
ToDisplayString
());
9152
AssertEx.Equal("Extensions.extension(object).M(object, string, int)", m2.
ToDisplayString
());
29866
AssertEx.Equal("C.extension(object).M()", methods[0].
ToDisplayString
());
29869
AssertEx.Equal("C.extension(object).M2()", methods[1].
ToDisplayString
());
48728
AssertEx.Equal("E.extension(bool).AssertTrue()", m1.
ToDisplayString
());
48734
AssertEx.Equal("E.extension(bool).AssertFalse()", m2.
ToDisplayString
());
Semantics\ExtensionTests2.cs (1)
24254
AssertEx.Equal(expected, extension.
ToDisplayString
(format));
Semantics\RecordTests.cs (13)
3508
.
ToDisplayString
(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
3539
.
ToDisplayString
(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
3598
.
ToDisplayString
(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
3701
.
ToDisplayString
(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
3804
.
ToDisplayString
(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
3917
.
ToDisplayString
(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
4030
.
ToDisplayString
(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
4142
.
ToDisplayString
(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
4255
.
ToDisplayString
(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
4663
.
ToDisplayString
(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
4766
.
ToDisplayString
(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
24233
Assert.Equal("B.Equals(B)", b.FindImplementationForInterfaceMember(b.InterfacesNoUseSiteDiagnostics()[1].GetMember("Equals")).
ToDisplayString
());
24235
Assert.Equal("C.Equals(C?)", c.FindImplementationForInterfaceMember(c.InterfacesNoUseSiteDiagnostics()[1].GetMember("Equals")).
ToDisplayString
());
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (31)
5903
AssertEx.Equal("C1.op_IncrementAssignment()", c1.FindImplementationForInterfaceMember(i1M1).
ToDisplayString
());
5990
AssertEx.Equal("C1.operator ++()", c1.FindImplementationForInterfaceMember(i1M1).
ToDisplayString
());
6134
AssertEx.Equal("C1.operator " + op + @"()", actualSymbol.
ToDisplayString
());
6209
AssertEx.Equal("C1.operator " + op + @"(C1)", actualSymbol.
ToDisplayString
());
6243
AssertEx.Equal("C1.operator " + op + @"(C1)", actualSymbol.
ToDisplayString
());
6277
AssertEx.Equal("C1.operator " + op + @"(C1)", actualSymbol.
ToDisplayString
());
6311
AssertEx.Equal("C1.operator " + op + @"(C1)", actualSymbol.
ToDisplayString
());
6475
AssertEx.Equal("C1.operator " + op + @"()", actualSymbol.
ToDisplayString
());
6511
AssertEx.Equal("C1.operator checked " + op + @"()", actualSymbol.
ToDisplayString
());
6588
AssertEx.Equal("C1.operator checked " + op + @"(C1)", actualSymbol.
ToDisplayString
());
6625
AssertEx.Equal("C1.operator checked " + op + @"(C1)", actualSymbol.
ToDisplayString
());
6662
AssertEx.Equal("C1.operator checked " + op + @"(C1)", actualSymbol.
ToDisplayString
());
6698
AssertEx.Equal("C1.operator checked " + op + @"(C1)", actualSymbol.
ToDisplayString
());
6867
AssertEx.Equal("C1.operator checked " + op + @"()", actualSymbol.
ToDisplayString
());
7436
AssertEx.Equal(display, m.
ToDisplayString
());
17559
AssertEx.Equal("C1.op_AdditionAssignment(int)", c1.FindImplementationForInterfaceMember(i1M1).
ToDisplayString
());
17646
AssertEx.Equal("C1.operator +=(int)", c1.FindImplementationForInterfaceMember(i1M1).
ToDisplayString
());
17833
AssertEx.Equal("C1.operator " + op + @"(int)", actualSymbol.
ToDisplayString
());
17877
AssertEx.Equal("C1.operator " + op + @"(int)", ambiguityWinner.
ToDisplayString
());
17879
AssertEx.Equal("C1.operator " + op + @"(int)", actualSymbols[0].
ToDisplayString
());
17880
AssertEx.Equal("C1.operator " + op + @"(long)", actualSymbols[1].
ToDisplayString
());
17914
AssertEx.Equal("C1.operator " + op + @"(int)", actualSymbol.
ToDisplayString
());
18034
AssertEx.Equal("C1." + CompoundAssignmentOperatorName(op, isChecked: false) + @"(int, long)", actualSymbol.
ToDisplayString
());
18068
AssertEx.Equal("C1.operator " + op + @"(int)", actualSymbol.
ToDisplayString
());
18148
AssertEx.Equal("C1.operator checked " + op + @"(int)", actualSymbol.
ToDisplayString
());
18238
AssertEx.Equal("C1.operator checked " + op + @"(int)", ambiguityWinner.
ToDisplayString
());
18240
AssertEx.Equal("C1.operator checked " + op + @"(int)", actualSymbols[0].
ToDisplayString
());
18241
AssertEx.Equal("C1.operator checked " + op + @"(long)", actualSymbols[1].
ToDisplayString
());
18277
AssertEx.Equal("C1.operator checked " + op + @"(int)", actualSymbol.
ToDisplayString
());
18403
AssertEx.Equal("C1." + CompoundAssignmentOperatorName(op, isChecked: true) + @"(int, long)", actualSymbol.
ToDisplayString
());
18438
AssertEx.Equal("C1.operator checked " + op + @"(int)", actualSymbol.
ToDisplayString
());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (278)
Semantics\ForEachTests.cs (1)
3764
Assert.Equal("C", boundNode.Expression.Type.
ToDisplayString
());
Semantics\NativeIntegerTests.cs (54)
120
Assert.Equal("void I.F1(System.IntPtr x, nint y)", method.
ToDisplayString
(TestFormat));
125
Assert.Equal("void I.F2(System.UIntPtr x, nuint y)", method.
ToDisplayString
(TestFormat));
216
Assert.Equal("void I.F1(System.IntPtr x, nint y)", method.
ToDisplayString
(TestFormat));
220
Assert.Equal("void I.F2(System.UIntPtr x, nuint y)", method.
ToDisplayString
(TestFormat));
720
Assert.Equal("void I.F1(System.IntPtr x, nint y)", method.
ToDisplayString
(TestFormat));
724
Assert.Equal("void I.F2(System.UIntPtr x, nuint y)", method.
ToDisplayString
(TestFormat));
817
Assert.Equal(expectedSymbol, field.
ToDisplayString
(TestFormat));
930
Assert.Equal(expectedSymbol, field.
ToDisplayString
(TestFormat));
1037
Assert.Equal(expectedSymbol, field.
ToDisplayString
(TestFormat));
1109
Assert.Equal(expectedSymbol, field.
ToDisplayString
(TestFormat));
1814
var actualMembers = members.SelectAsArray(m => m.
ToDisplayString
(TestFormat));
1979
var actualMembers = members.SelectAsArray(m => m.
ToDisplayString
(TestFormat));
2149
var actualMembers = members.SelectAsArray(m => m.
ToDisplayString
(TestFormat));
2245
var actualMembers = members.SelectAsArray(m => m.
ToDisplayString
(TestFormat));
2373
var actualMembers = members.SelectAsArray(m => m.
ToDisplayString
(TestFormat));
2498
var actualMembers = members.SelectAsArray(m => m.
ToDisplayString
(TestFormat));
2649
var actualMembers = members.SelectAsArray(m => m.
ToDisplayString
(TestFormat));
2751
var actualMembers = members.SelectAsArray(m => m.
ToDisplayString
(TestFormat));
2891
var actualMembers = members.SelectAsArray(m => m.
ToDisplayString
(TestFormat));
3687
Assert.Equal("System.Int16 Program.F(System.Int16 x, System.Object y)", method.
ToDisplayString
(TestFormat));
3721
Assert.Equal("System.Int16 Program.F(System.Int16 x, nuint y)", method.
ToDisplayString
(TestFormat));
3755
Assert.Equal("System.Int16 Program.F(System.Int16 x, nuint y)", method.
ToDisplayString
(TestFormat));
13578
Assert.Equal("S<nint> I.F1()", type.GetMember("F1").
ToDisplayString
(TestFormat));
13579
Assert.Equal("S<System.IntPtr> I.F2()", type.GetMember("F2").
ToDisplayString
(TestFormat));
13580
Assert.Equal("S<nint> I.F3()", type.GetMember("F3").
ToDisplayString
(TestFormat));
13581
Assert.Equal("S<System.IntPtr> I.F4()", type.GetMember("F4").
ToDisplayString
(TestFormat));
13584
Assert.Equal("S<System.IntPtr> C.I.F1()", type.GetMember("I.F1").
ToDisplayString
(TestFormat));
13585
Assert.Equal("S<nint> C.I.F2()", type.GetMember("I.F2").
ToDisplayString
(TestFormat));
13586
Assert.Equal("S<nint> C.I.F3()", type.GetMember("I.F3").
ToDisplayString
(TestFormat));
13587
Assert.Equal("S<System.IntPtr> C.I.F4()", type.GetMember("I.F4").
ToDisplayString
(TestFormat));
13614
Assert.Equal("nint[] A.F1()", type.GetMember("F1").
ToDisplayString
(TestFormat));
13615
Assert.Equal("System.IntPtr[] A.F2()", type.GetMember("F2").
ToDisplayString
(TestFormat));
13616
Assert.Equal("nint[] A.F3()", type.GetMember("F3").
ToDisplayString
(TestFormat));
13617
Assert.Equal("System.IntPtr[] A.F4()", type.GetMember("F4").
ToDisplayString
(TestFormat));
13620
Assert.Equal("System.IntPtr[] B.F1()", type.GetMember("F1").
ToDisplayString
(TestFormat));
13621
Assert.Equal("nint[] B.F2()", type.GetMember("F2").
ToDisplayString
(TestFormat));
13622
Assert.Equal("nint[] B.F3()", type.GetMember("F3").
ToDisplayString
(TestFormat));
13623
Assert.Equal("System.IntPtr[] B.F4()", type.GetMember("F4").
ToDisplayString
(TestFormat));
13673
Assert.Equal("void A.F1(nint modopt(System.Int32) i)", type.GetMember("F1").
ToDisplayString
(TestFormat));
13674
Assert.Equal("void A.F2(System.IntPtr modopt(System.Int32) i)", type.GetMember("F2").
ToDisplayString
(TestFormat));
13675
Assert.Equal("void A.F3(nint modopt(System.Int32) i)", type.GetMember("F3").
ToDisplayString
(TestFormat));
13676
Assert.Equal("void A.F4(System.IntPtr modopt(System.Int32) i)", type.GetMember("F4").
ToDisplayString
(TestFormat));
13679
Assert.Equal("void B.F1(System.IntPtr modopt(System.Int32) i)", type.GetMember("F1").
ToDisplayString
(TestFormat));
13680
Assert.Equal("void B.F2(nint modopt(System.Int32) i)", type.GetMember("F2").
ToDisplayString
(TestFormat));
13681
Assert.Equal("void B.F3(nint modopt(System.Int32) i)", type.GetMember("F3").
ToDisplayString
(TestFormat));
13682
Assert.Equal("void B.F4(System.IntPtr modopt(System.Int32) i)", type.GetMember("F4").
ToDisplayString
(TestFormat));
13736
Assert.Equal("nint[] modopt(System.Int32) A.F1()", type.GetMember("F1").
ToDisplayString
(TestFormat));
13737
Assert.Equal("System.IntPtr[] modopt(System.Int32) A.F2()", type.GetMember("F2").
ToDisplayString
(TestFormat));
13738
Assert.Equal("nint[] modopt(System.Int32) A.F3()", type.GetMember("F3").
ToDisplayString
(TestFormat));
13739
Assert.Equal("System.IntPtr[] modopt(System.Int32) A.F4()", type.GetMember("F4").
ToDisplayString
(TestFormat));
13742
Assert.Equal("System.IntPtr[] modopt(System.Int32) B.F1()", type.GetMember("F1").
ToDisplayString
(TestFormat));
13743
Assert.Equal("nint[] modopt(System.Int32) B.F2()", type.GetMember("F2").
ToDisplayString
(TestFormat));
13744
Assert.Equal("nint[] modopt(System.Int32) B.F3()", type.GetMember("F3").
ToDisplayString
(TestFormat));
13745
Assert.Equal("System.IntPtr[] modopt(System.Int32) B.F4()", type.GetMember("F4").
ToDisplayString
(TestFormat));
Semantics\NullableReferenceTypesTests.cs (219)
77081
Assert.Equal("B.implicit operator B?(int)", b.GetMember("op_Implicit").
ToDisplayString
());
77084
.
ToDisplayString
(new SymbolDisplayFormat(delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature,
77088
.
ToDisplayString
(new SymbolDisplayFormat(delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature,
77092
.
ToDisplayString
(new SymbolDisplayFormat(delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature,
77153
Assert.Equal("B.implicit operator B?(int)", b.GetMember("op_Implicit").
ToDisplayString
());
77157
.
ToDisplayString
(new SymbolDisplayFormat(delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature,
97773
Assert.Equal("void B.F1<T1>(T1? t1) where T1 : class!", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
97779
Assert.Equal("void B.F2<T2>(T2 t2) where T2 : class?", f2.
ToDisplayString
(SymbolDisplayFormat.TestFormat.WithGenericsOptions(SymbolDisplayFormat.TestFormat.GenericsOptions | SymbolDisplayGenericsOptions.IncludeTypeConstraints)));
97780
Assert.Equal("void B.F2<T2>(T2 t2) where T2 : class", f2.
ToDisplayString
(SymbolDisplayFormat.TestFormat.WithGenericsOptions(SymbolDisplayFormat.TestFormat.GenericsOptions | SymbolDisplayGenericsOptions.IncludeTypeConstraints).
97824
Assert.Equal("A<T1> where T1 : class!", a.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
97837
Assert.Equal("B<T2> where T2 : class?", b.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
97884
Assert.Equal("void F1<T1>(T1? t1) where T1 : class!", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
97890
Assert.Equal("void F2<T2>(T2 t2) where T2 : class?", f2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
97931
Assert.Equal("B<T1> where T1 : class?", b.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
97944
Assert.Equal("void B<T1>.F2<T2>(T2 t2) where T2 : class?", f2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98542
Assert.Equal("void B.F1<T11>() where T11 : class!", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98556
Assert.Equal("void B.F2<T22>() where T22 : class?", bf2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98609
Assert.Equal("void B.F1<T11>(T11? t1)", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98616
Assert.Equal("void B.F2<T22>(T22 t2) where T22 : class?", bf2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98622
Assert.Equal("void A<System.Int32>.F2<T2>(T2 t2) where T2 : class?", af2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98733
Assert.Equal("void B.F1<T11>() where T11 : class!", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98747
Assert.Equal("void B.F2<T22>() where T22 : class?", bf2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98762
Assert.Equal("void B.F3<T33>() where T33 : C1<C2?>!", bf3.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98765
Assert.Equal("void B.F4<T44>() where T44 : C1<C2!>?", bf4.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98840
Assert.Equal("void B.IA.F1<T11>() where T11 : class!", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98854
Assert.Equal("void B.IA.F2<T22>() where T22 : class?", bf2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98906
Assert.Equal("void B.IA.F1<T11>() where T11 : class!", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98920
Assert.Equal("void B.IA.F2<T22>() where T22 : class?", bf2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98987
Assert.Equal("void B.IA.F1<T11>() where T11 : class!", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
98993
Assert.Equal("void B.IA.F2<T22>() where T22 : class?", bf2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
99047
Assert.Equal("void B.IA.F1<T11>() where T11 : class!", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
99061
Assert.Equal("void B.IA.F2<T22>() where T22 : class?", bf2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
99106
Assert.Equal("void B.IA.F1<T11>(T11? t1) where T11 : class!", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
99111
Assert.Equal("void B.IA.F2<T22>(T22 t2) where T22 : class?", bf2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
99137
Assert.Equal("void B.F2<T2>() where T2 : class?", f2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
99170
Assert.Equal("B<T2> where T2 : class?", b.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
99213
Assert.Equal("void F2<T2>() where T2 : class?", f2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
99421
Assert.Equal("void B.F1<T11>() where T11 : class!", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
99435
Assert.Equal("void B.F2<T22>() where T22 : class?", bf2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
99450
Assert.Equal("void B.F3<T33>() where T33 : C1<C2?>!", bf3.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
99453
Assert.Equal("void B.F4<T44>() where T44 : C1<C2!>?", bf4.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100415
Assert.Equal("void B.F1<T1>() where T1 : notnull", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100453
Assert.Equal("void B.F1<T1>() where T1 : notnull", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100505
Assert.Equal("void B.F1<T1>(T1? t1)", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100512
Assert.Equal("void B.F2<T2>(T2? t2)", f2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100544
Assert.Equal("void B.F1<T1>() where T1 : notnull", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100564
Assert.Equal("void B.F1<T1>() where T1 : notnull", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100619
Assert.Equal("void B.F1<T1>(T1? t1) where T1 : struct", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100627
Assert.Equal("void B.F2<T2>(T2? t2) where T2 : struct", f2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100663
Assert.Equal("void B.F1<T1>(T1? t1) where T1 : class!", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100670
Assert.Equal("void B.F2<T2>(T2? t2) where T2 : class!", f2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100708
Assert.Equal("void B.F1<T1>(T1? t1) where T1 : class?", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100715
Assert.Equal("void B.F2<T2>(T2? t2) where T2 : class?", f2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100747
Assert.Equal("void B.F1<T1>(T1? t1) where T1 : class?", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100790
Assert.Equal("void A.I<System.Object!>.F1<TF1A>(TF1A x) where TF1A : System.Object!", af1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100794
Assert.Equal("void A.I<System.Object>.F1<TF1A>(TF1A x) where TF1A : System.Object!", af1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100805
Assert.Equal("void I<System.Object!>.F1<TF1>(TF1 x) where TF1 : System.Object!", af1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100811
Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x)", impl.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100820
Assert.Equal("void B.I<System.Object?>.F1<TF1B>(TF1B x)", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100824
Assert.Equal("void B.I<System.Object>.F1<TF1B>(TF1B x)", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100834
Assert.Equal("void I<System.Object?>.F1<TF1>(TF1 x)", bf1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100842
Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x)", impl.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100885
Assert.Equal("void A.I<A!>.F1<TF1A>(TF1A! x) where TF1A : A!", af1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100889
Assert.Equal("void A.I<A>.F1<TF1A>(TF1A! x) where TF1A : A!", af1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100900
Assert.Equal("void I<A!>.F1<TF1>(TF1 x) where TF1 : A!", af1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100905
Assert.Equal("void I<A>.F1<TF1>(TF1 x) where TF1 : A", af1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100913
Assert.Equal("void B.I<A?>.F1<TF1B>(TF1B x) where TF1B : A?", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100917
Assert.Equal("void B.I<A>.F1<TF1B>(TF1B x) where TF1B : A?", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100927
Assert.Equal("void I<A?>.F1<TF1>(TF1 x) where TF1 : A?", bf1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100932
Assert.Equal("void I<A>.F1<TF1>(TF1 x) where TF1 : A", bf1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100974
Assert.Equal("void A.I<System.Object!>.F1<TF1A>(TF1A! x) where TF1A : class?, System.Object!", af1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100978
Assert.Equal("void A.I<System.Object>.F1<TF1A>(TF1A! x) where TF1A : class?, System.Object!", af1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100987
Assert.Equal("void I<System.Object!>.F1<TF1>(TF1 x) where TF1 : class?, System.Object!", af1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100991
Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x) where TF1 : class?, System.Object", af1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
100999
Assert.Equal("void B.I<System.Object?>.F1<TF1B>(TF1B x) where TF1B : class?", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101003
Assert.Equal("void B.I<System.Object>.F1<TF1B>(TF1B x) where TF1B : class?", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101011
Assert.Equal("void I<System.Object?>.F1<TF1>(TF1 x) where TF1 : class?", bf1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101015
Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x) where TF1 : class?, System.Object", bf1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101041
Assert.Equal("void B.F1<T1>(T1? t1) where T1 : notnull, B!", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101065
Assert.Equal("void B.F1<T1>(T1? t1) where T1 : notnull, B?", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101090
Assert.Equal("void B.F1<T1>(T1? t1) where T1 : notnull, B!", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101117
Assert.Equal("void B.F1<T1>(T1? t1) where T1 : B!", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101160
Assert.Equal("void A.I<System.Object!>.F1<TF1A>(TF1A! x) where TF1A : System.Object!, B?", af1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101164
Assert.Equal("void A.I<System.Object>.F1<TF1A>(TF1A! x) where TF1A : System.Object!, B?", af1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101173
Assert.Equal("void I<System.Object!>.F1<TF1>(TF1 x) where TF1 : System.Object!, B?", af1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101177
Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x) where TF1 : System.Object, B?", af1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101185
Assert.Equal("void B.I<System.Object?>.F1<TF1B>(TF1B x) where TF1B : B?", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101189
Assert.Equal("void B.I<System.Object>.F1<TF1B>(TF1B x) where TF1B : B?", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101197
Assert.Equal("void I<System.Object?>.F1<TF1>(TF1 x) where TF1 : B?", bf1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101201
Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x) where TF1 : System.Object, B?", bf1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101242
Assert.Equal("void A.I<System.Object!, B?>.F1<TF1A>(TF1A! x) where TF1A : System.Object!, B?", af1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101246
Assert.Equal("void A.I<System.Object, B>.F1<TF1A>(TF1A! x) where TF1A : System.Object!, B?", af1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101255
Assert.Equal("void I<System.Object!, B?>.F1<TF1>(TF1 x) where TF1 : System.Object!, B?", af1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101259
Assert.Equal("void I<System.Object, B>.F1<TF1>(TF1 x) where TF1 : B", af1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101267
Assert.Equal("void B.I<System.Object?, B?>.F1<TF1B>(TF1B x) where TF1B : B?", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101271
Assert.Equal("void B.I<System.Object, B>.F1<TF1B>(TF1B x) where TF1B : B?", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101279
Assert.Equal("void I<System.Object?, B?>.F1<TF1>(TF1 x) where TF1 : B?", bf1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
101283
Assert.Equal("void I<System.Object, B>.F1<TF1>(TF1 x) where TF1 : B", bf1.ExplicitInterfaceImplementations.Single().
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102049
Assert.Equal("void I1.F1<TF1>()", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102072
Assert.Equal("void I1.F1<TF1, TF2>() where TF2 : class", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102101
Assert.Equal("void I1.F1<TF1>() where TF1 : new()", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102128
Assert.Equal("void I1.F1<TF1>() where TF1 : class", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102155
Assert.Equal("void I1.F1<TF1>() where TF1 : struct", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102182
Assert.Equal("void I1.F1<TF1>() where TF1 : unmanaged", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102209
Assert.Equal("void I1.F1<TF1>() where TF1 : I1", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102251
Assert.Equal("void I1.F1<TF1>() where TF1 : class?", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102282
Assert.Equal("void I1.F1<TF1>() where TF1 : I1?", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102320
Assert.Equal("void I1.F1<TF1>()", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102354
Assert.Equal("void I1.F1<TF1, TF2>() where TF1 : class?", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102394
Assert.Equal("void I1.F1<TF1>() where TF1 : new()", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102432
Assert.Equal("void I1.F1<TF1>() where TF1 : class!", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102459
Assert.Equal("void I1.F1<TF1>() where TF1 : struct", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102487
Assert.Equal("void I1.F1<TF1>() where TF1 : unmanaged", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102515
Assert.Equal("void I1.F1<TF1>() where TF1 : I1!", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102554
Assert.Equal("void I1.F1<TF1>() where TF1 : class?", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102582
Assert.Equal("void I1.F1<TF1>() where TF1 : I1?", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102609
Assert.Equal("I1<TF1>", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102631
Assert.Equal("I1<TF1, TF2> where TF2 : class", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102659
Assert.Equal("I1<TF1> where TF1 : new()", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102685
Assert.Equal("I1<TF1> where TF1 : class", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102711
Assert.Equal("I1<TF1> where TF1 : struct", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102737
Assert.Equal("I1<TF1> where TF1 : unmanaged", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102763
Assert.Equal("I1<TF1> where TF1 : I1<TF1>", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102795
Assert.Equal("I1<TF1> where TF1 : class?", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102834
Assert.Equal("I1<TF1> where TF1 : I1<TF1>?", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102862
Assert.Equal("I1<TF1>", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102895
Assert.Equal("I1<TF1, TF2> where TF1 : class?", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102934
Assert.Equal("I1<TF1> where TF1 : new()", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
102971
Assert.Equal("I1<TF1> where TF1 : class!", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
103006
Assert.Equal("I1<TF1> where TF1 : struct", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
103033
Assert.Equal("I1<TF1> where TF1 : unmanaged", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
103060
Assert.Equal("I1<TF1> where TF1 : I1<TF1>!", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
103089
Assert.Equal("I1<TF1> where TF1 : class?", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
103124
Assert.Equal("I1<TF1> where TF1 : I1<TF1>?", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
103156
Assert.Equal("I1<TF1>", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
103189
Assert.Equal("I1<TF1>", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
103232
Assert.Equal("I1<TF1>", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
103276
Assert.Equal("I1<TF1>", i1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
104932
Assert.Equal("void B.F1<T11>(T11? t1) where T11 : class", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
104945
Assert.Equal("void A<System.Int32>.F1<T1>(T1? t1) where T1 : class", af1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
104958
Assert.Equal("void B.F2<T22>(T22 t2) where T22 : class?", bf2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
104972
Assert.Equal("void A<System.Int32>.F2<T2>(T2 t2) where T2 : class?", af2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105036
Assert.Equal("void B.F1<T11>(T11? t1) where T11 : class!", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105042
Assert.Equal("void B.F2<T22>(T22 t2) where T22 : class?", bf2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105113
Assert.Equal("void B.F1<T11>(T11? t1) where T11 : class!", bf1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105119
Assert.Equal("void B.F2<T22>(T22 t2) where T22 : class?", bf2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105164
Assert.Equal("void B<S>.F1<T1>(T1 t1)", f1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105167
Assert.Equal("void B<S>.F2<T2>(T2 t2)", f2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105211
Assert.Equal("void Test2.M1<S>() where S : System.Object!", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105215
Assert.Equal("void Test1<dynamic!>.M1<S>() where S : System.Object!", baseM1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105255
Assert.Equal("void Test2.M1<S>()", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105259
Assert.Equal("void Test1<dynamic>.M1<S>()", baseM1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105304
Assert.Equal("void Test2.M1<S>() where S : Test1<System.Object!>!", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105308
Assert.Equal("void Test1<Test1<dynamic!>!>.M1<S>() where S : Test1<System.Object!>!", baseM1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105340
Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1?", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
105344
Assert.Equal("void Test1<dynamic!>.M1<S>(S x) where S : System.Object!, I1?", baseM1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106281
Assert.Equal("void Test2.M1<S>(S x)", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106312
Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106343
Assert.Equal("void Test2.M1<S>(S x)", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106375
Assert.Equal("void Test2.M1<S>(S x) where S : I1", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106408
Assert.Equal("void Test2.M1<S>(S x) where S : System.Object, I1?", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106441
Assert.Equal("void Test2.M1<S>(S x) where S : I1!", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106473
Assert.Equal("void Test2.M1<S>(S x) where S : I1!", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106505
Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1?", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106538
Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106568
Assert.Equal("void Test2.M1<S>(S x) where S : class", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106599
Assert.Equal("void Test2.M1<S>(S x) where S : class?, System.Object", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106630
Assert.Equal("void Test2.M1<S>(S x) where S : class!", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106662
Assert.Equal("void Test2.M1<S>(S! x) where S : class!", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106694
Assert.Equal("void Test2.M1<S>(S! x) where S : class?, System.Object!", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106727
Assert.Equal("void Test2.M1<S>(S! x) where S : class, System.Object!", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106758
Assert.Equal("void Test2.M1<S>(S x) where S : notnull", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106790
Assert.Equal("void Test2.M1<S>(S x) where S : notnull", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106821
Assert.Equal("void Test2.M1<S>(S x) where S : struct", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106853
Assert.Equal("void Test2.M1<S>(S x) where S : struct", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106883
Assert.Equal("void Test2.M1<S>(S x) where S : System.Int32", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106913
Assert.Equal("void Test2.M1<S>(S x) where S : System.Int32", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106943
Assert.Equal("void Test2.M1<S>(S x) where S : System.Object, System.Int32?", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
106973
Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, System.Int32?", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107163
Assert.Equal("void Test2.M1<S>(S x)", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107167
Assert.Equal("void Test2.M2<S>(S x) where S : I1", m2.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107171
Assert.Equal("void Test2.M3<S>(S x) where S : class", m3.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107175
Assert.Equal("void Test2.M4<S>(S x) where S : class?, System.Object", m4.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107179
Assert.Equal("void Test2.M5<S>(S x) where S : class!", m5.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107183
Assert.Equal("void Test2.M6<S>(S x) where S : notnull", m6.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107187
Assert.Equal("void Test2.M7<S>(S x)", m7.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107191
Assert.Equal("void Test2.M8<S>(S x) where S : struct", m8.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107195
Assert.Equal("void Test2.M9<S>(S x) where S : System.Int32", m9.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107199
Assert.Equal("void Test2.M10<S>(S x) where S : System.Object, System.Int32?", m10.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107234
Assert.Equal("void Test2.M1<S, U>(S x) where S : System.Object", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107269
Assert.Equal("void Test2.M1<S, U>(S x) where S : System.Object, U", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107300
Assert.Equal("void Test2.M1<S>(S x) where S : class?, System.Object", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107337
Assert.Equal("void Test2.M1<S>(S x) where S : System.Object, I1?", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107373
Assert.Equal("void Test2.M1<S>(S x) where S : System.Object, I1?", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107410
Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1?", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107446
Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1?", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107484
Assert.Equal("void Test2<T>.M1<S>(S x) where S : T", t2m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107488
Assert.Equal("void Test3.M1<S>(S x) where S : System.Object, Test3?", t3m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107531
Assert.Equal("void Test3.M1<S>(S x) where S : System.Object, Test3?", t3m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107569
Assert.Equal("void Test2<T>.M1<S>(S x) where S : T", t2m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107573
Assert.Equal("void Test3.M1<S>(S x) where S : System.Int32", t3m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107610
Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107646
Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107683
Assert.Equal("void Test2.M1<S>(S! x) where S : I1?, System.String!", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107719
Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String!", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107755
Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String?", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107791
Assert.Equal("void Test2.M1<S>(S! x) where S : I1?, System.String!", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
107827
Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
108397
Assert.Equal("void B.M1<TM1>(TM1 x) where TM1 : class", m1.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
111132
Assert.Equal("C<T, U> where T : class! where U : T?", c.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
113773
Assert.Equal("A<T> where T : class!", a.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier)));
113792
Assert.Equal("A<T> where T : class", a.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier)));
113816
Assert.Equal("A<T> where T : class?", a.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier)));
113817
Assert.Equal("A<T> where T : class", a.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier)));
113838
Assert.Equal("A<T> where T : class?", a.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier)));
113839
Assert.Equal("A<T> where T : class", a.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier)));
113871
Assert.Equal("A<T> where T : unmanaged!", a.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier)));
113892
Assert.Equal("A<T> where T : unmanaged", a.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier)));
145892
Assert.Equal(new[] { "I<object>", "I<object!>" }, interfaces.Select(i => i.
ToDisplayString
(TypeWithAnnotations.TestDisplayFormat)));
Semantics\RecordStructTests.cs (2)
403
Assert.Equal("record struct Point", point.
ToDisplayString
(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
410
Assert.Equal("struct Point", point.
ToDisplayString
(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword)));
Semantics\RefFieldTests.cs (2)
12061
Assert.Equal(expectedDisplayString, parameter.
ToDisplayString
(displayFormatWithScoped));
15783
Assert.Equal(expectedDisplayString, local.
ToDisplayString
(displayFormatWithScoped));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (80)
SymbolDisplay\SymbolDisplayTests.cs (7)
4858
Assert.Equal("Gen<V>.M(LibG<V>)", msym1.
ToDisplayString
());
4864
Assert.Equal(msym1.
ToDisplayString
(), msym2.
ToDisplayString
());
5237
Assert.Equal("M(e1 = A, e2 = A)", method.
ToDisplayString
(memberFormat)); // Alphabetically first candidate chosen for both enums.
5405
Assert.Equal("M1", m1.
ToDisplayString
(format));
5409
Assert.Equal("P1", p1.
ToDisplayString
(format));
5413
Assert.Equal("E1", e1.
ToDisplayString
(format));
Symbols\AnonymousTypesSymbolTests.cs (7)
1020
Assert.Equal(typeViewName, type.
ToDisplayString
());
1021
Assert.Equal("object", type.BaseType().
ToDisplayString
());
1045
Assert.Equal(genericParameters[i], typeParameter.
ToDisplayString
());
1112
propType.
ToDisplayString
()
1125
Assert.Equal(signature, method.
ToDisplayString
());
1154
Assert.Equal(attr.CtorName, actual[index].AttributeConstructor.
ToDisplayString
());
1462
.Select(t => t.
ToDisplayString
())
Symbols\AssemblyAndNamespaceTests.cs (1)
62
Assert.Equal("Test.dll", sym.
ToDisplayString
());
Symbols\CheckedUserDefinedOperatorsTests.cs (20)
56
Assert.Equal("C.operator checked " + op + "(C)", opSymbol.
ToDisplayString
());
376
Assert.Equal("C.operator checked " + op + "(C, C)", opSymbol.
ToDisplayString
());
407
Assert.Equal("C.operator checked " + op + "()", opSymbol.
ToDisplayString
());
483
Assert.Equal("C.operator +(C)", opSymbol.
ToDisplayString
());
510
Assert.Equal("C.operator +(C)", opSymbol.
ToDisplayString
());
934
Assert.Equal("C.operator " + op + "(C)", opSymbol.
ToDisplayString
());
970
Assert.Equal("C.operator true(C)", opSymbol1.
ToDisplayString
());
976
Assert.Equal("C.operator false(C)", opSymbol2.
ToDisplayString
());
1298
Assert.Equal("C.operator checked " + op + "(C, C)", opSymbol.
ToDisplayString
());
1552
Assert.Equal("C.operator checked " + op + "(C)", opSymbol.
ToDisplayString
());
1579
Assert.Equal("C.operator checked " + op + "()", opSymbol.
ToDisplayString
());
1661
Assert.Equal("C.operator checked +(C, C)", opSymbol.
ToDisplayString
());
1688
Assert.Equal("C.operator +(C, C)", opSymbol.
ToDisplayString
());
2211
Assert.Equal("C.operator " + op + "(C, int)", opSymbol.
ToDisplayString
());
2467
Assert.Equal("C.operator checked +()", opSymbol.
ToDisplayString
());
2494
Assert.Equal("C.operator +()", opSymbol.
ToDisplayString
());
2532
Assert.Equal("C.explicit operator checked int(C)", opSymbol.
ToDisplayString
());
2784
Assert.Equal("C.explicit operator checked int(C, C)", opSymbol.
ToDisplayString
());
2807
Assert.Equal("C.explicit operator checked int()", opSymbol.
ToDisplayString
());
3218
Assert.Equal("C.implicit operator int(C)", opSymbol.
ToDisplayString
());
Symbols\CompilationCreationTests.cs (4)
2414
Assert.Equal(typeC301.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameArityFormat),
2416
GetTypeMembers("C301").Single().
ToDisplayString
(SymbolDisplayFormat.QualifiedNameArityFormat));
2418
Assert.Equal(typeC6.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameArityFormat),
2419
asm3.GlobalNamespace.GetTypeMembers("C6").Single().
ToDisplayString
(SymbolDisplayFormat.QualifiedNameArityFormat));
Symbols\DefaultInterfaceImplementationTests.cs (4)
33032
var i1i2m1 = i1.GetMember<MethodSymbol>(i1.OriginalDefinition.AllInterfacesNoUseSiteDiagnostics.Where(i => i.Name == "I2").Single().
ToDisplayString
() + "." + name);
33033
var i1i4m1 = i1.GetMember<MethodSymbol>(i1.OriginalDefinition.AllInterfacesNoUseSiteDiagnostics.Where(i => i.Name == "I4").Single().
ToDisplayString
() + "." + name);
33060
i1i2m1 = i1.GetMember<MethodSymbol>(i1.OriginalDefinition.AllInterfacesNoUseSiteDiagnostics.Where(i => i.Name == "I2").Single().
ToDisplayString
() + "." + name);
33061
i1i4m1 = i1.GetMember<MethodSymbol>(i1.OriginalDefinition.AllInterfacesNoUseSiteDiagnostics.Where(i => i.Name == "I4").Single().
ToDisplayString
() + "." + name);
Symbols\FunctionPointerTypeSymbolTests.cs (2)
1514
Assert.Equal("delegate*<ref readonly int>", f1.
ToDisplayString
());
1516
Assert.Equal("delegate*<ref int>", f2.
ToDisplayString
());
Symbols\GenericConstraintTests.cs (10)
3231
Assert.Equal("I<U> B.F<U>() where U : class", method.
ToDisplayString
(SymbolDisplayFormat.TestFormatWithConstraints));
3757
Assert.Equal("I2", i2.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameArityFormat));
3791
Assert.Equal("I2`2", i2.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameArityFormat));
3825
Assert.Equal("I2`1", i2.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameArityFormat));
3859
Assert.Equal("I2`01", i2.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameArityFormat));
3908
Assert.Equal("I2`1", i2.
ToDisplayString
(SymbolDisplayFormat.QualifiedNameArityFormat));
4885
Assert.Equal("IA<A<T1>.B<object>>", typeParameter.ConstraintTypes()[0].
ToDisplayString
());
4890
Assert.Equal("A<T2[]>.B<T1>", typeParameter.ConstraintTypes()[0].
ToDisplayString
());
4896
Assert.Equal("IA<A<X>.B<object>>", typeParameter.ConstraintTypes()[0].
ToDisplayString
());
4901
Assert.Equal("A<Y[]>.B<X>", typeParameter.ConstraintTypes()[0].
ToDisplayString
());
Symbols\Source\CustomModifierCopyTests.cs (13)
890
Assert.Equal("Bug813305.IBug813305.M(dynamic)", method.
ToDisplayString
());
1012
interfaceMethod1.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat));
1022
classMethod1.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat));
1067
AssertEx.Equal("(object, object) C.M((object c, object d) x)", classMethod3.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat));
1084
AssertEx.Equal("(object a, object b) C.M((object c, object d) x)", classMethod4.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat));
1140
AssertEx.Equal("(object a, object b) I.P", interfaceProperty1.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat));
1146
AssertEx.Equal("(object a, object b) C.P", classProperty1.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat));
1288
baseMethod1.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat));
1296
Assert.Equal("(object a, object b) Base.P", baseProperty1.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat));
1303
Assert.Equal("(object a, object b) C.P", classProperty1.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat));
1307
AssertEx.Equal("(object a, object b) C.M((object c, object d) y)", classMethod1.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat));
1335
AssertEx.Equal("(object, object) C.M((object c, object d) y)", classMethod2.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat));
1357
AssertEx.Equal("(object a, object b) C.M((object, object) y)", classMethod3.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat));
Symbols\Source\MethodTests.cs (1)
1639
Assert.Equal("@in", pin.
ToDisplayString
(
Symbols\StaticAbstractMembersInInterfacesTests.cs (5)
32656
Assert.Equal("C.operator " + op + "(C)", opSymbol.
ToDisplayString
());
32695
Assert.Equal("C.operator true(C)", opSymbol1.
ToDisplayString
());
32701
Assert.Equal("C.operator false(C)", opSymbol2.
ToDisplayString
());
32904
Assert.Equal("C.operator " + op + "(C, int)", opSymbol.
ToDisplayString
());
33091
Assert.Equal("C<T>.implicit operator int(T)", opSymbol.
ToDisplayString
());
Symbols\TypeResolutionTests.cs (4)
131
Assert.Equal("System.StringComparison", strcmpSym.
ToDisplayString
());
135
Assert.Equal("System.Collections.Generic.List<int>[][*,*,*]", arraySym.
ToDisplayString
());
139
Assert.Equal("char**", ptrSym.
ToDisplayString
());
143
Assert.Equal(testType1 + ".C<int, bool>.D.E<double, float>.F<byte>", nestedSym1.
ToDisplayString
());
Symbols\TypeTests.cs (2)
1571
Assert.Equal("decimal?", memType.
ToDisplayString
());
1628
Assert.Equal("E?", memType.
ToDisplayString
());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (15)
AttributeValidation.cs (2)
33
Assert.Equal(WellKnownTypes.GetMetadataName(WellKnownType.System_Runtime_CompilerServices_CompilerGeneratedAttribute), isUnmanagedTypeAttributes[0].AttributeClass.
ToDisplayString
());
34
Assert.Equal(AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName, isUnmanagedTypeAttributes[1].AttributeClass.
ToDisplayString
());
CompilationTestUtils.cs (2)
49
string[] symbolDescriptions = (from s in symbols select s.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat)).ToArray();
79
Assert.Equal(symbol.
ToDisplayString
(SymbolDisplayFormat.MinimallyQualifiedFormat), description);
CSharpTestBase.cs (3)
1962
var symbols = builder.SelectAsArray(s => s.
ToDisplayString
(format));
2567
return string.Format("\"{0}\"", (reference is Symbol symbol) ? symbol.
ToDisplayString
(SymbolDisplayFormat.ILVisualizationFormat) : (object)reference);
2588
return symbol?.
ToDisplayString
(SymbolDisplayFormat.ILVisualizationFormat) ?? type.ToString()!;
Extensions.cs (2)
447
var s1 = typeSym.
ToDisplayString
(SymbolDisplayFormat.TestFormat);
733
return symbol.
ToDisplayString
(SymbolDisplayFormat.TestFormat);
NullableAttributesVisitor.cs (1)
93
_builder.AppendLine(symbol.
ToDisplayString
(DisplayFormat));
RequiredMemberAttributesVisitor.cs (1)
66
_builder.AppendLine(symbol.
ToDisplayString
(DisplayFormat));
SymbolUtilities.cs (2)
124
return symbols.Select(s => s.
ToDisplayString
(format)).ToArray();
136
return symbol.
ToDisplayString
(format);
TestAttributesVisitor.cs (2)
134
_builder.AppendLine(s.
ToDisplayString
(DisplayFormat));
150
_builder.AppendLine(symbol.
ToDisplayString
(DisplayFormat));