6 implementations of ToDisplayString
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
198public string ToDisplayString(SymbolDisplayFormat format = null)
Microsoft.CodeAnalysis.CSharp (2)
Symbols\PublicModel\PreprocessingSymbol.cs (1)
78string ISymbol.ToDisplayString(SymbolDisplayFormat? format)
Symbols\PublicModel\Symbol.cs (1)
164string ISymbol.ToDisplayString(SymbolDisplayFormat format)
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedSymbol.cs (1)
98public string ToDisplayString(SymbolDisplayFormat format = null)
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\Symbol.vb (1)
1325Private Function ISymbol_ToDisplayString(Optional format As SymbolDisplayFormat = Nothing) As String Implements ISymbol.ToDisplayString
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
198public string ToDisplayString(SymbolDisplayFormat format = null)
908 references to ToDisplayString
ConfigurationSchemaGenerator (9)
ConfigSchemaEmitter.cs (2)
421if (attribute.AttributeClass?.ToDisplayString() == "System.ObsoleteAttribute") 425else if (attribute.AttributeClass?.ToDisplayString() == "System.ComponentModel.EditorBrowsableAttribute" &&
ConfigSchemaGenerator.cs (2)
62if (attribute.AttributeClass?.ToDisplayString() == ConfigurationSchemaAttributeName) 85else if (attribute.AttributeClass?.ToDisplayString() == LoggingCategoriesAttributeName)
RuntimeSource\Configuration.Binder\Parser\BinderInvocation.cs (1)
68string containingNamespaceName = containingNamespace.ToDisplayString();
RuntimeSource\Configuration.Binder\Parser\Extensions.cs (3)
103: type.ToDisplayString(s_identifierCompatibleFormat).Replace(".", string.Empty); 125string? @namespace = type.ContainingNamespace is { IsGlobalNamespace: false } containingNamespace ? containingNamespace.ToDisplayString() : null; 126string displayString = type.ToDisplayString(s_minimalDisplayFormat);
RuntimeSource\SourceGenerators\TypeModelHelper.cs (1)
38public static string GetFullyQualifiedName(this ITypeSymbol type) => type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
ILLink.RoslynAnalyzer (5)
ISymbolExtensions.cs (5)
140 sb.Append (fieldSymbol.ContainingSymbol.ToDisplayString (ILLinkTypeDisplayFormat)); 150 sb.Append (symbol.ContainingType.ToDisplayString (ILLinkTypeDisplayFormat)); 162 sb.Append (methodSymbol.ContainingType.ToDisplayString (ILLinkTypeDisplayFormat)); 166 sb.Append (methodSymbol.ToDisplayString (ILLinkMemberDisplayFormat)); 170 sb.Append (symbol.ToDisplayString ());
Microsoft.Analyzers.Extra (2)
CallAnalysis\Arrays.cs (2)
128var diagnostic = Diagnostic.Create(DiagDescriptors.Arrays, loc, valueType.ToDisplayString(), type.ToDisplayString());
Microsoft.Analyzers.Local (9)
ApiLifecycle\AssemblyAnalysis.cs (8)
131var typeSignature = type.ToDisplayString(_format); 141var baseTypes = new HashSet<string>(type.AllInterfaces.Select(x => x.ToDisplayString(_shortSymbolNameFormat))); 150_ = baseTypes.Add(type.EnumUnderlyingType.ToDisplayString(_format)); 157_ = baseTypes.Add(baseType.ToDisplayString(_shortSymbolNameFormat)); 219var methodSignature = member.ToDisplayString(_formatNoVariance) + ";"; 234var propSignature = member.ToDisplayString(_formatNoVariance); 249var fieldSignature = member.ToDisplayString(_formatNoVariance); 255fieldSignature = "const " + t.ToDisplayString(_enumType) + " " + fieldSignature;
Utilities\SymbolExtensions.cs (1)
54var attrType = a.AttributeClass?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
Microsoft.AspNetCore.Analyzers (1)
OptionsFacts.cs (1)
16if (string.Equals(item.OptionsType.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), SymbolNames.MvcOptions.MetadataName) &&
Microsoft.AspNetCore.Analyzers.Test (1)
ConfigureMethodVisitorTest.cs (1)
86.Select(m => m.ContainingType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + "." + m.Name)
Microsoft.AspNetCore.App.Analyzers (2)
src\Shared\RoslynUtils\SymbolExtensions.cs (2)
222var constructedType = $"typeof({parameterSymbol.ContainingType.ToDisplayString()})"; 223var parameterTypes = constructor.Parameters.Select(parameter => $"typeof({parameter.Type.ToDisplayString()})");
Microsoft.AspNetCore.Components.Analyzers (12)
ComponentParameterAnalyzer.cs (8)
87property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 94property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 108property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), 109property.Type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), 110symbols.ParameterCaptureUnmatchedValuesRuntimeType.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 118property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 129type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), 133captureUnmatchedValuesParameters.Select(p => p.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)).OrderBy(n => n))));
InternalUsageAnalyzer.cs (4)
140symbol.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 150containingType.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 169symbol.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 179containingType.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat)));
Microsoft.AspNetCore.Components.SdkAnalyzers (11)
ComponentParameterAnalyzer.cs (7)
81property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 88property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 102property.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), 103property.Type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), 104symbols.ParameterCaptureUnmatchedValuesRuntimeType.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat))); 116type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), 120captureUnmatchedValuesParameters.Select(p => p.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)).OrderBy(n => n))));
InternalUsageAnalyzer.cs (4)
140symbol.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 150containingType.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 169symbol.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 179containingType.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat)));
Microsoft.AspNetCore.Http.RequestDelegateGenerator (56)
src\Shared\RoslynUtils\SymbolExtensions.cs (2)
222var constructedType = $"typeof({parameterSymbol.ContainingType.ToDisplayString()})"; 223var parameterTypes = constructor.Parameters.Select(parameter => $"typeof({parameter.Type.ToDisplayString()})");
StaticRouteHandlerModel\Emitters\EmitterExtensions.cs (2)
20? $"{endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat)}.BindAsync(HttpContext)" 21: $"{endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat)}.BindAsync(HttpContext, ParameterInfo)",
StaticRouteHandlerModel\Emitters\EndpointEmitter.cs (2)
120var shortParameterTypeName = parameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat); 121codeWriter.WriteLine($"ResolveJsonBodyOrService<{parameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)}>(logOrThrowExceptionHelper, {SymbolDisplay.FormatLiteral(shortParameterTypeName, true)}, {SymbolDisplay.FormatLiteral(parameter.SymbolName, true)}, jsonSerializerOptions, serviceProviderIsService);");
StaticRouteHandlerModel\Emitters\EndpointJsonPreparationEmitter.cs (3)
18var typeName = responseType.ToDisplayString(EmitterConstants.DisplayFormatWithoutNullability); 40var typeName = parameter.Type.ToDisplayString(EmitterConstants.DisplayFormat); 41codeWriter.WriteLine($"var {parameter.SymbolName}_JsonTypeInfo = (JsonTypeInfo<{typeName}>)jsonSerializerOptions.GetTypeInfo(typeof({parameter.Type.ToDisplayString(EmitterConstants.DisplayFormatWithoutNullability)}));");
StaticRouteHandlerModel\Emitters\EndpointParameterEmitter.cs (27)
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)});"); 95var createArray = $"new {endpointParameter.ElementType.ToDisplayString(EmitterConstants.DisplayFormat)}[{endpointParameter.EmitTempArgument()}.Length]"; 98codeWriter.WriteLine($"{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)} {endpointParameter.EmitHandlerArgument()} = {createArray};"); 128codeWriter.WriteLine($"{endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)} {endpointParameter.EmitHandlerArgument()} = {endpointParameter.EmitTempArgument()}!;"); 141codeWriter.WriteLine($"""{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)} {output_argument} = default;"""); 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); 256var assigningCode = $"await GeneratedRouteBuilderExtensionsCore.TryResolveBodyAsync<{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)}>(httpContext, logOrThrowExceptionHelper, {(endpointParameter.IsOptional ? "true" : "false")}, {SymbolDisplay.FormatLiteral(shortParameterTypeName, true)}, {SymbolDisplay.FormatLiteral(endpointParameter.SymbolName, true)}, {endpointParameter.SymbolName}_JsonTypeInfo)"; 304codeWriter.WriteLine($"{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)} {endpointParameter.EmitHandlerArgument()} = null!;"); 316var shortParameterTypeName = endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat); 317var assigningCode = $"await GeneratedRouteBuilderExtensionsCore.TryResolveBodyAsync<{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)}>(httpContext, logOrThrowExceptionHelper, {(endpointParameter.IsOptional ? "true" : "false")}, {SymbolDisplay.FormatLiteral(shortParameterTypeName, true)}, {SymbolDisplay.FormatLiteral(endpointParameter.SymbolName, true)}, {endpointParameter.SymbolName}_JsonTypeInfo)"; 319codeWriter.WriteLine($"var {endpointParameter.SymbolName}_JsonTypeInfo = (JsonTypeInfo<{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)}>)jsonOptions.SerializerOptions.GetTypeInfo(typeof({endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormatWithoutNullability)}));"); 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)});"); 392$"httpContext.RequestServices.GetService<{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)}>();" : 393$"httpContext.RequestServices.GetRequiredService<{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)}>()"; 407$"httpContext.RequestServices.GetKeyedService<{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)}>({endpointParameter.KeyedServiceKey});" : 408$"httpContext.RequestServices.GetRequiredKeyedService<{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)}>({endpointParameter.KeyedServiceKey})";
StaticRouteHandlerModel\EndpointParameter.cs (13)
45var propertyInfo = $"typeof({property.ContainingType.ToDisplayString()})!.GetProperty({SymbolDisplay.FormatLiteral(property.Name, true)})!"; 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);
StaticRouteHandlerModel\EndpointResponse.cs (1)
32WrappedResponseTypeDisplayName = method.ReturnType.ToDisplayString(EmitterConstants.DisplayFormat);
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (6)
224codeWriter.WriteLine($$"""options.EndpointBuilder.Metadata.Add(new ProducesResponseTypeMetadata(statusCode: StatusCodes.Status200OK, type: typeof({{responseType.ToDisplayString(EmitterConstants.DisplayFormatWithoutNullability)}}), contentTypes: GeneratedMetadataConstants.JsonContentType));"""); 237codeWriter.WriteLine($"PopulateMetadataForEndpoint<{responseType.ToDisplayString(EmitterConstants.DisplayFormat)}>(methodInfo, options.EndpointBuilder);"); 275codeWriter.WriteLine($"PopulateMetadataForParameter<{parameterType.ToDisplayString(EmitterConstants.DisplayFormat)}>({parameter.SymbolName}_ParameterInfo, options.EndpointBuilder);"); 280codeWriter.WriteLine($"PopulateMetadataForEndpoint<{parameterType.ToDisplayString(EmitterConstants.DisplayFormat)}>(methodInfo, options.EndpointBuilder);"); 320codeWriter.WriteLine($$"""options.EndpointBuilder.Metadata.Add(new AcceptsMetadata(type: typeof({{explicitBodyParameter.Type.ToDisplayString(EmitterConstants.DisplayFormatWithoutNullability)}}), isOptional: {{(explicitBodyParameter.IsOptional ? "true" : "false")}}, contentTypes: GeneratedMetadataConstants.JsonContentType));"""); 332codeWriter.WriteLine($$"""({{(parameter.IsOptional ? "true" : "false")}}, typeof({{parameter.Type.ToDisplayString(EmitterConstants.DisplayFormatWithoutNullability)}})),""");
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
AddResponseTypeAttributeCodeFixAction.cs (1)
219SyntaxFactory.ParseTypeName(typeSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat))
Microsoft.CodeAnalysis (11)
CodeGen\CompilationTestData.cs (1)
131return iMethod.ToDisplayString(format);
DiagnosticAnalyzer\AnalyzerDriver.cs (2)
2912declaredSymbol.ToDisplayString() == otherSymbol.ToDisplayString();
DiagnosticAnalyzer\SymbolDeclaredCompilationEvent.cs (1)
54return "SymbolDeclaredCompilationEvent(" + name + " " + Symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat) + loc + ")";
Emit\NoPia\CommonEmbeddedMethod.cs (1)
310return UnderlyingMethod.GetInternalSymbol().GetISymbol().ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat);
Emit\NoPia\CommonEmbeddedParameter.cs (1)
271return ((ISymbol)UnderlyingParameter).ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat);
Emit\NoPia\CommonEmbeddedType.cs (1)
715return UnderlyingNamedType.GetInternalSymbol().GetISymbol().ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat);
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (1)
164attribute.AttributeClass?.ToDisplayString(s_metadataDisplayFormat) == fullyQualifiedMetadataName)
SymbolDisplay\FormattedSymbol.cs (1)
35return _symbol.GetISymbol().ToDisplayString(_symbolDisplayFormat);
SymbolDisplay\FormattedSymbolList.cs (1)
46builder.Append(symbol.ToDisplayString(_symbolDisplayFormat));
TreeDumper.cs (1)
226return symbol.ToDisplayString(SymbolDisplayFormat.TestFormat);
Microsoft.CodeAnalysis.CodeStyle (6)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (2)
153collectionElementType.ToDisplayString(), 154iterationType.ToDisplayString()));
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
74var currentNamespace = symbol.ToDisplayString(s_namespaceDisplayFormat);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamespaceOrTypeSymbolExtensions.cs (1)
23=> symbol.ToDisplayString(s_shortNameFormat);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
20=> symbol.ToDisplayString(SymbolDisplayFormats.NameFormat); 23=> symbol.ToDisplayString(SymbolDisplayFormats.SignatureFormat);
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
352var methodDisplay = methodToUpdate.ToDisplayString(new SymbolDisplayFormat( 358var parameters = methodToUpdate.Parameters.Select(p => p.ToDisplayString(SimpleFormat));
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceCodeFixProvider.cs (1)
106var typeName = interfaceType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
Microsoft.CodeAnalysis.CSharp (3)
Compilation\CSharpCompilation.cs (1)
4099throw new ArgumentException(string.Format(CSharpResources.CallingConventionTypeIsInvalid, type.ToDisplayString()));
Symbols\PublicModel\AssemblySymbol.cs (1)
60OrderBy(t => t.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)).AsImmutable();
Symbols\TypedConstantExtensions.cs (1)
56string typeName = constant.Type.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
108return (defaultExpression, $"default({type.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)})"); 117return (memberAccess, $"{type.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)}.{memberName}");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamespaceGenerator.cs (1)
178: ParseName(symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
SymbolKey\SymbolKeyErrorTypeTests.cs (1)
397Assert.Equal(symbol.ToDisplayString(), resolution.Symbol!.ToDisplayString());
SymbolKey\SymbolKeyTests.cs (1)
172Assert.Equal("global::ConditionalWeakTableTest<TKey!, TValue!>.CreateValueCallback!", parameterType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier)));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (39)
CodeGen\CodeGenDeconstructTests.cs (36)
3701Assert.Equal("var", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 3706Assert.Equal("int", model.GetSymbolInfo(x2Type).Symbol.ToDisplayString()); 3754Assert.Equal("int", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 3803Assert.Equal("D", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 3806Assert.Equal("D", x1Alias.Target.ToDisplayString()); 3811Assert.Equal("int", model.GetSymbolInfo(x2Type).Symbol.ToDisplayString()); 3943Assert.Equal("int", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 3948Assert.Equal("var", model.GetSymbolInfo(x2Type).Symbol.ToDisplayString()); 3989Assert.Equal("int", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 3994Assert.Equal("int", model.GetSymbolInfo(x2Type).Symbol.ToDisplayString()); 5036Assert.Equal("string", model.GetSymbolInfo(xType).Symbol.ToDisplayString()); 5042Assert.Equal("int", model.GetSymbolInfo(yType).Symbol.ToDisplayString()); 5188Assert.Equal("string", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 5819Assert.Equal("byte", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 5822Assert.Equal("byte", x1Alias.Target.ToDisplayString()); 5827Assert.Equal("byte", model.GetSymbolInfo(x3Type).Symbol.ToDisplayString()); 5830Assert.Equal("byte", x3Alias.Target.ToDisplayString()); 5871Assert.Equal("var", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 5877Assert.Equal("var", model.GetSymbolInfo(x3Type).Symbol.ToDisplayString()); 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)); 7356Assert.Equal("int", model.GetTypeInfo(x1Ref).Type.ToDisplayString()); 7361Assert.Equal("string[]", model.GetTypeInfo(x2Ref).Type.ToDisplayString()); 7395Assert.Equal("int", model.GetTypeInfo(x1Ref).Type.ToDisplayString()); 7431Assert.Equal("int", model.GetTypeInfo(x1Ref.First()).Type.ToDisplayString()); 7436Assert.Equal("string[]", model.GetTypeInfo(x2Ref.First()).Type.ToDisplayString()); 7565Assert.Equal("int", model.GetTypeInfo(x1Ref).Type.ToDisplayString()); 7569Assert.Equal("string", model.GetTypeInfo(x2Ref).Type.ToDisplayString());
CodeGen\CodeGenRefLocalTests.cs (1)
4079Assert.Equal("C", alias.Target.ToDisplayString());
Emit\DeterministicTests.cs (1)
367return getForwardedTypes(assembly).Select(t => t.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat));
Emit\InAttributeModifierTests.cs (1)
4569Assert.Equal(typeName, modifier.Modifier.ToDisplayString());
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
Emit\NumericIntPtrTests.cs (4)
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)));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (19)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
841ctxt.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor1, method.Locations[0], method.ToDisplayString()));
Semantics\CollectionExpressionTests.cs (7)
38000Assert.Equal("object.Object()", info.Symbol.ToDisplayString()); 38035Assert.Equal("object.Object()", info.Symbol.ToDisplayString()); 38072Assert.Equal("object.Object()", info.Symbol.ToDisplayString()); 38109Assert.Equal("object.Object()", info.Symbol.ToDisplayString()); 38146Assert.Equal("object.Object()", info.Symbol.ToDisplayString()); 38183Assert.Equal("object.Object()", info.Symbol.ToDisplayString()); 38226Assert.Equal("object.Object()", info.Symbol.ToDisplayString());
Semantics\OutVarTests.cs (1)
33098Assert.Equal("int _", discard3Symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));
Semantics\PatternMatchingTests_ListPatterns.cs (8)
3647Assert.Equal(declaredType, ((ILocalSymbol)symbol).Type.ToDisplayString()); 3652Assert.Equal(type, typeInfo.Type.ToDisplayString()); 3653Assert.Equal(type, typeInfo.ConvertedType.ToDisplayString()); 3691Assert.Equal(type, typeInfo.Type.ToDisplayString()); 3692Assert.Equal(type, typeInfo.ConvertedType.ToDisplayString()); 4417Assert.Equal(declaredType, ((ILocalSymbol)symbol).Type.ToDisplayString()); 4422Assert.Equal(type, typeInfo.Type.ToDisplayString()); 4423Assert.Equal(type, typeInfo.ConvertedType.ToDisplayString());
Semantics\PatternMatchingTests2.cs (2)
725Assert.Equal("int", ((ILocalSymbol)symbol).Type.ToDisplayString()); 731Assert.Equal("int", typeInfo.Type.ToDisplayString());
Microsoft.CodeAnalysis.CSharp.Features (12)
AddImport\CSharpAddImportFeatureService.cs (1)
329var displayString = namespaceOrTypeSymbol.ToDisplayString();
CodeLens\CSharpCodeLensDisplayInfoService.cs (6)
108var displayName = symbol.ToDisplayString(Format); 123var displayName = symbol.ToDisplayString(Format); 136var displayName = symbol.ToDisplayString(Format); 149var displayName = symbol.ToDisplayString(Format); 176return symbol != null ? symbol.ToDisplayString(Format) : FeaturesResources.paren_Unknown_paren; 195return scopeSymbol.ToDisplayString(symbolDisplayFormat);
ExtractInterface\CSharpExtractInterfaceService.cs (1)
54: typeSymbol.ContainingNamespace.ToDisplayString();
NavigationBar\CSharpNavigationBarItemService.cs (2)
111text: type.ToDisplayString(s_typeFormat), 200member.ToDisplayString(s_memberFormat),
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
108return (defaultExpression, $"default({type.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)})"); 117return (memberAccess, $"{type.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)}.{memberName}");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (66)
Semantics\DeconstructionTests.cs (2)
3768Assert.Equal("(int, int)", model.GetTypeInfo(literal1).Type.ToDisplayString()); 3771Assert.Equal("(int, int)", model.GetTypeInfo(literal2).Type.ToDisplayString());
Semantics\InteractiveSemanticModelTests.cs (1)
351var method = bindInfo.Symbol.ToDisplayString();
Semantics\LambdaTests.cs (1)
847Assert.Equal("int", tinfo.Type.ToDisplayString());
Semantics\LockTests.cs (1)
578Assert.Equal(@"System.Collections.Generic.IEnumerable<char>", model.GetTypeInfo(lockStatements[0].Expression).Type.ToDisplayString());
Semantics\LookupTests.cs (5)
1566Assert.Equal("object.F()", method.ToDisplayString()); 1569Assert.Equal("E.F(object)", reducedFrom.ToDisplayString()); 1600Assert.Equal("E.F(object)", method.ToDisplayString()); 1604Assert.Equal("object.F()", method.ToDisplayString()); 1607Assert.Equal("E.F(object)", reducedFrom.ToDisplayString());
Semantics\NativeIntegerTests.cs (4)
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 (46)
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)); 76978.ToDisplayString(new SymbolDisplayFormat(delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature, 76982.ToDisplayString(new SymbolDisplayFormat(delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature, 76986.ToDisplayString(new SymbolDisplayFormat(delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature, 77051.ToDisplayString(new SymbolDisplayFormat(delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature, 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))); 145384Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 145424Assert.Equal("Extension<object?>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 145464Assert.Equal("Extension<object?>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 145503Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 145541Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 145574Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 145607Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 145644Assert.Equal("Extension<object>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 145683Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 145953Assert.Equal("Extension<object?>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 145984Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 146017Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158063Assert.Equal("object", ((IPropertySymbol)model.GetSymbolInfo(item).Symbol).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158066Assert.Equal("object", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158099Assert.Equal("object", ((IPropertySymbol)model.GetSymbolInfo(item).Symbol).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158194Assert.Equal("object", ((IMethodSymbol)model.GetSymbolInfo(item).Symbol).ReturnType.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158232Assert.Equal("object", ((IPropertySymbol)model.GetSymbolInfo(item).Symbol).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158235Assert.Equal("object", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158275Assert.Equal("object", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158316Assert.Equal("object", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158351Assert.Equal("object", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158384Assert.Equal("object", ((IPropertySymbol)model.GetSymbolInfo(item).Symbol).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158479Assert.Equal("object", ((IMethodSymbol)model.GetSymbolInfo(item).Symbol).ReturnType.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158485Assert.Equal("object", ((IMethodSymbol)found).ReturnType.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158527Assert.Equal("object!", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158571Assert.Equal("object!", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158608Assert.Equal("object!", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat));
Semantics\ObjectAndCollectionInitializerTests.cs (1)
4172Assert.Equal("I", typeInfo.ConvertedType.ToDisplayString());
Semantics\RefFieldTests.cs (2)
12009Assert.Equal(expectedDisplayString, parameter.ToDisplayString(displayFormatWithScoped)); 15725Assert.Equal(expectedDisplayString, local.ToDisplayString(displayFormatWithScoped));
Semantics\TryCatchTests.cs (2)
48Assert.Equal("System.IO.IOException", localSymbol.Type.ToDisplayString()); 51Assert.Equal("string.operator !=(string, string)", filterExprInfo.Symbol.ToDisplayString());
Semantics\UsingStatementTests.cs (1)
1871Assert.Equal(variables[i++].ToString(), symbol.ToDisplayString());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (149)
Compilation\CompilationAPITests.cs (9)
2612Assert.Equal("<anonymous type: int m1>", type.ToDisplayString()); 2635Assert.Equal("<anonymous type: int m1, int m2>", type.ToDisplayString()); 2648Assert.Equal("<anonymous type: int m1, bool m2>", type.ToDisplayString()); 2744var result = op.ToDisplayString(); 2762var result = op.ToDisplayString(); 2781var result = op.ToDisplayString(); 2940var result = op.ToDisplayString(); 2952var result = op.ToDisplayString(); 2971var result = op.ToDisplayString();
Compilation\GetSemanticInfoTests.cs (1)
3584Assert.Equal("C.MessageBox(System.IntPtr, string, string, uint)", symbolInfo.Symbol.ToDisplayString());
Compilation\SemanticModelAPITests.cs (21)
2716Assert.Equal(expectedTypeDisplayString, symbol.ToDisplayString()); 2721Assert.Equal(expectedTypeDisplayString, symbol.ToDisplayString()); 2730Assert.Equal(expectedTypeDisplayString, symbol.ToDisplayString()); 2735Assert.Equal(expectedTypeDisplayString, symbol.ToDisplayString()); 2904Assert.Equal("A", symbol.ToDisplayString()); 2905Assert.Equal("System.ArgumentException", symbol.Target.ToDisplayString()); 2926Assert.Equal("int", symbol.ToDisplayString()); 2939Assert.Equal("object", symbol.ToDisplayString()); 2945Assert.Equal("object", symbol.ToDisplayString()); 2966Assert.Equal("int", symbol.ToDisplayString()); 2979Assert.Equal("A", symbol.ToDisplayString()); 2985Assert.Equal("A", symbol.ToDisplayString()); 3011Assert.Equal("int", symbol.ToDisplayString()); 3024Assert.Equal("A.B", symbol.ToDisplayString()); 3029Assert.Equal("A.B", symbol.ToDisplayString()); 3034Assert.Equal("A", symbol.ToDisplayString()); 3040Assert.Equal("A.B", symbol.ToDisplayString()); 3052Assert.Equal("A.M()", symbol.ToDisplayString()); 3057Assert.Equal("A.M()", symbol.ToDisplayString()); 3062Assert.Equal("A", symbol.ToDisplayString()); 3068Assert.Equal("A.M()", symbol.ToDisplayString());
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (19)
3277Assert.Equal("C.N(int)", initInfo.Symbol.ToDisplayString()); 3290Assert.Equal("C.N()", argInfo.Symbol.ToDisplayString()); 3928Assert.Equal("System", alias1.Target.ToDisplayString()); 3932Assert.Equal("System.IO", alias2.Target.ToDisplayString()); 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));
Compilation\SemanticModelGetSemanticInfoTests.cs (31)
9674Assert.Equal("ValidWithSuffix_And_ValidWithoutSuffix.Description.Description(string)", semanticInfo.Symbol.ToDisplayString()); 9679Assert.Equal("ValidWithSuffix_And_ValidWithoutSuffix.Description.Description(string)", semanticInfo.MethodGroup[0].ToDisplayString()); 9725Assert.Equal("ValidWithSuffix_And_ValidWithoutSuffix.DescriptionAttribute.DescriptionAttribute(string)", semanticInfo.Symbol.ToDisplayString()); 9730Assert.Equal("ValidWithSuffix_And_ValidWithoutSuffix.DescriptionAttribute.DescriptionAttribute(string)", semanticInfo.MethodGroup[0].ToDisplayString()); 15083Assert.Equal("int", semanticInfo.Type.ToDisplayString()); 15085Assert.Equal("int", semanticInfo.ConvertedType.ToDisplayString()); 15089Assert.Equal("string.Length", semanticInfo.Symbol.ToDisplayString()); 15121var sortedCandidates = semanticInfo.CandidateSymbols.AsEnumerable().OrderBy(s => s.ToDisplayString(), StringComparer.Ordinal).ToArray(); 15122Assert.Equal("string.ToString()", sortedCandidates[0].ToDisplayString()); 15124Assert.Equal("string.ToString(System.IFormatProvider)", sortedCandidates[1].ToDisplayString()); 15128var sortedMethodGroup = semanticInfo.MethodGroup.AsEnumerable().OrderBy(s => s.ToDisplayString(), StringComparer.Ordinal).ToArray(); 15129Assert.Equal("string.ToString()", sortedMethodGroup[0].ToDisplayString()); 15130Assert.Equal("string.ToString(System.IFormatProvider)", sortedMethodGroup[1].ToDisplayString()); 15151Assert.Equal("string", semanticInfo.Type.ToDisplayString()); 15153Assert.Equal("string", semanticInfo.ConvertedType.ToDisplayString()); 15157Assert.Equal("string.ToString()", semanticInfo.Symbol.ToDisplayString()); 15182Assert.Equal("int", semanticInfo.Type.ToDisplayString()); 15184Assert.Equal("int", semanticInfo.ConvertedType.ToDisplayString()); 15188Assert.Equal("string.Length", semanticInfo.Symbol.ToDisplayString()); 15213Assert.Equal("int", semanticInfo.Type.ToDisplayString()); 15215Assert.Equal("?", semanticInfo.ConvertedType.ToDisplayString()); 15219Assert.Equal("string.Length", semanticInfo.Symbol.ToDisplayString()); 15244Assert.Equal("int", semanticInfo.Type.ToDisplayString()); 15246Assert.Equal("int", semanticInfo.ConvertedType.ToDisplayString()); 15250Assert.Equal("string.Length", semanticInfo.Symbol.ToDisplayString()); 15275Assert.Equal("char", semanticInfo.Type.ToDisplayString()); 15277Assert.Equal("char", semanticInfo.ConvertedType.ToDisplayString()); 15281Assert.Equal("string.this[int]", semanticInfo.Symbol.ToDisplayString()); 15308Assert.Equal("BaselineLog", semanticInfo.Symbol.ToDisplayString()); 15337Assert.Equal("dynamic", semanticInfo.Type.ToDisplayString()); 15339Assert.Equal("dynamic", semanticInfo.ConvertedType.ToDisplayString());
SymbolDisplay\SymbolDisplayTests.cs (1)
9035Assert.Equal("NET5_0_OR_GREATER", preprocessingSymbol.ToDisplayString(format));
Symbols\AnonymousTypesSemanticsTests.cs (8)
592Assert.Equal("object.Equals(object)", method.ToDisplayString()); 660Assert.Equal("object.ToString()", method.ToDisplayString()); 681Assert.Equal("object.GetHashCode()", method.ToDisplayString()); 702Assert.Equal("<anonymous type: int f1, string f2>..ctor(int, string)", method.ToDisplayString()); 780Assert.Equal("x", info1.Symbol.ToDisplayString()); 849Assert.Equal("x", info1.Symbol.ToDisplayString()); 854Assert.Equal("y", info2.Symbol.ToDisplayString()); 1540Assert.Equal("<anonymous type: int a>.a", info.Symbol.ToDisplayString());
Symbols\AssemblyAndNamespaceTests.cs (1)
62Assert.Equal("Test.dll", sym.ToDisplayString());
Symbols\CovariantReturnTests.cs (2)
2633Assert.Equal("System.Linq.Expressions.Expression(Of System.Func(Of Derived, String))", typeInfo.ConvertedType.ToDisplayString()); 2637Assert.Equal("System.Linq.Expressions.Expression(Of System.Func(Of Derived, System.Func(Of String)))", typeInfo.ConvertedType.ToDisplayString());
Symbols\GenericConstraintTests.cs (2)
7395Assert.Equal("Base.Nest", model.GetTypeInfo(nest).Type.ToDisplayString()); 7420Assert.Equal("Base.Nest", model.GetTypeInfo(nest).Type.ToDisplayString());
Symbols\Metadata\PE\LoadingAttributes.cs (3)
1162Assert.Equal("AttributeUse.IFoo<System.Int16, System.UInt16>", (attrSym.CommonConstructorArguments[0].Value as INamedTypeSymbol).ToDisplayString(SymbolDisplayFormat.TestFormat)); 1211Assert.Equal("System.Linq.Expressions.Expression.BinaryExpressionProxy", ((ITypeSymbol)attr1.CommonConstructorArguments[0].Value).ToDisplayString(SymbolDisplayFormat.TestFormat)); 1216Assert.Equal("System.Linq.Expressions.Expression.TypeBinaryExpressionProxy", ((ITypeSymbol)attr1.CommonConstructorArguments[0].Value).ToDisplayString(SymbolDisplayFormat.TestFormat));
Symbols\Metadata\PE\TypeForwarders.cs (1)
1529return assembly.GetForwardedTypes().Select(t => t.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat));
Symbols\RelaxedShiftOperatorTests.cs (6)
105Assert.Equal("C1.operator " + op + "(C1, C2)", model.GetSymbolInfo(shift).Symbol.ToDisplayString()); 149Assert.Equal("C1.operator " + op + "(C1, C2)", model.GetSymbolInfo(shift).Symbol.ToDisplayString()); 193Assert.Equal("C1.operator " + op + "(C1, C2)", model.GetSymbolInfo(shift).Symbol.ToDisplayString()); 237Assert.Equal("C1.operator " + op + "(C1, C2)", model.GetSymbolInfo(shift).Symbol.ToDisplayString()); 281Assert.Equal("C1.operator " + op + "(C1, C2)", model.GetSymbolInfo(shift).Symbol.ToDisplayString()); 325Assert.Equal("C1.operator " + op + "(C1, C2)", model.GetSymbolInfo(shift).Symbol.ToDisplayString());
Symbols\Source\FileModifierTests.cs (1)
4126Assert.Equal("System.Void@<tree 0>", typeInfo.Type!.ToDisplayString(SymbolDisplayFormat.TestFormat.WithCompilerInternalOptions(SymbolDisplayCompilerInternalOptions.IncludeContainingFileForFileTypes)));
Symbols\Source\UsingAliasTests.cs (39)
53Assert.Equal("O", alias1.ToDisplayString()); 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)); 113Assert.Equal("O", alias1.ToDisplayString()); 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)); 390Assert.Equal("O", alias.ToDisplayString()); 391Assert.Equal("O=System.Object", alias.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 411Assert.Equal("O", alias.ToDisplayString()); 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));
Symbols\TypeTests.cs (4)
1770Assert.Equal("System.PlatformID?", memType.ToDisplayString()); 1777Assert.Equal("NS.IGoo<float, System.PlatformID>", tinfo.Type.ToDisplayString()); 1781Assert.Equal("float?", tinfo.Type.ToDisplayString()); 1786Assert.Equal("decimal?", tinfo.ConvertedType.ToDisplayString());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (6)
AttributeValidation.cs (2)
33Assert.Equal(WellKnownTypes.GetMetadataName(WellKnownType.System_Runtime_CompilerServices_CompilerGeneratedAttribute), isUnmanagedTypeAttributes[0].AttributeClass.ToDisplayString()); 34Assert.Equal(AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName, isUnmanagedTypeAttributes[1].AttributeClass.ToDisplayString());
CompilationTestUtils.cs (3)
34string[] symbolDescriptions = (from s in symbols select s.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)).ToArray(); 63AssertEx.SetEqual(symbols.Select(s => s.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)), descriptions); 74Assert.Equal(symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat), description);
SymbolUtilities.cs (1)
130return symbol.ToDisplayString(format);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Simplification\CSharpSimplificationService.Expander.cs (3)
753[.. typeArguments.Select(p => ParseTypeName(p.ToDisplayString(s_typeNameFormatWithGenerics)))])) 935var displayString = displaySymbol.ToDisplayString(s_typeNameFormatWithGenerics); 1098var containingTypeString = reducedExtensionMethod.ContainingType.ToDisplayString(s_typeNameFormatWithGenerics);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamespaceGenerator.cs (1)
178: ParseName(symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
Microsoft.CodeAnalysis.EditorFeatures (3)
CodeDefinitionWindow\DefinitionContextTracker.cs (2)
180symbol.ToDisplayString(), result.Value.filePath, result.Value.linePosition)); 188symbol.ToDisplayString(), declarationFile.FilePath, identifierSpan.Start));
InlineRename\AbstractEditorInlineRenameService.SymbolRenameInfo.cs (1)
127public string FullDisplayName => RenameSymbol.ToDisplayString();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
MoveStaticMembers\TestMoveStaticMembersService.cs (1)
57: selectedType.ContainingNamespace.ToDisplayString();
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\DiagnosticServiceTests.vb (1)
1887ctxt.ReportDiagnostic(Diagnostic.Create(Descriptor, method.Locations(0), method.ToDisplayString))
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (2)
InstructionDecoder.cs (2)
51builder.Append(parameter.Type.ToDisplayString(DisplayFormat)); 125return ((IMethodSymbol)method.GetISymbol()).ReturnType.ToDisplayString(DisplayFormat);
Microsoft.CodeAnalysis.Features (33)
CodeLens\CodeLensReferencesService.cs (1)
254var fullName = GetEnclosingMethod(semanticModel, commonLocation, cancellationToken)?.ToDisplayString(MethodDisplayFormat);
Common\TaggedText.cs (1)
95getNavigationHint ??= static symbol => symbol?.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat);
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionProvider.cs (1)
112usingsBuilder.Add(@namespace.ToDisplayString(SymbolDisplayFormats.NameFormat));
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionProvider.cs (1)
105var namespaceOfTarget = target.ContainingNamespace.ToDisplayString(SymbolDisplayFormats.NameFormat);
Debugging\AbstractBreakpointResolver.cs (1)
84var vsDebugName = methodSymbol.ToDisplayString(s_vsDebugNameFormat);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (4)
309symbol.ContainingSymbol.ToDisplayString(format)) 313symbol.ToDisplayString(format)); 1791[GetDisplayName(newNode, EditKind.Update), oldType.ToDisplayString(), newType.ToDisplayString()]));
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
52firstField.ToDisplayString(),
ExtractInterface\AbstractExtractInterfaceService.cs (1)
117: refactoringResult.TypeToExtractFrom.ContainingNamespace.ToDisplayString();
ExtractMethod\MethodExtractor.cs (1)
284currentType == null ? string.Empty : currentType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)));
ExtractMethod\MethodExtractor.VariableSymbol.cs (3)
181return _parameterSymbol.ToDisplayString( 235return _localSymbol.ToDisplayString( 347return _symbol.ToDisplayString(
GenerateType\AbstractGenerateTypeService.State.cs (1)
363NamespaceToGenerateInOpt = TypeToGenerateInOpt.ContainingNamespace.ToDisplayString(format);
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (1)
564var displayName = targetSymbol.ToDisplayString(s_displayFormat);
LanguageServiceIndexFormat\SymbolMoniker.cs (2)
55return new SymbolMoniker(WellKnownSymbolMonikerSchemes.DotnetNamespace, symbol.ToDisplayString()); 78throw new Exception($"Unable to get documentation comment ID for {symbol.ToDisplayString()}");
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedSymbol.cs (1)
99=> _symbol.ToDisplayString(format);
MetadataAsSource\AbstractMetadataAsSourceService.cs (1)
108topLevelNamespaceSymbol.ToDisplayString(SymbolDisplayFormats.NameFormat),
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
227var documentTooltip = topLevelNamedType.ToDisplayString(new SymbolDisplayFormat(typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces));
MoveToNamespace\AbstractMoveToNamespaceService.cs (3)
294: symbol.ContainingNamespace.ToDisplayString().Length + 1; 296return $"{targetNamespace}.{symbol.ToDisplayString()[offset..]}"; 304=> namespaceSymbol.ToDisplayString(QualifiedNamespaceFormat);
PdbSourceDocument\ImplementationAssemblyLookupService.cs (1)
65var namespaceName = typeSymbol.ContainingNamespace.ToDisplayString(s_metadataSymbolDisplayFormat);
Snippets\SnippetFunctionService.cs (1)
71var fullyQualifiedEnumName = typeSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (2)
153collectionElementType.ToDisplayString(), 154iterationType.ToDisplayString()));
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
74var currentNamespace = symbol.ToDisplayString(s_namespaceDisplayFormat);
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
352var methodDisplay = methodToUpdate.ToDisplayString(new SymbolDisplayFormat( 358var parameters = methodToUpdate.Parameters.Select(p => p.ToDisplayString(SimpleFormat));
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceCodeFixProvider.cs (1)
106var typeName = interfaceType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
Microsoft.CodeAnalysis.Test.Utilities (4)
Compilation\TestOperationVisitor.cs (1)
821AssertEx.Fail($"Unexpected parameter count for built in method: {method.ToDisplayString()}");
Extensions\SymbolExtensions.cs (1)
13return symbol.ToDisplayString(SymbolDisplayFormat.TestFormat);
Metadata\ILBuilderVisualizer.cs (2)
63return string.Format("\"{0}\"", symbol == null ? (object)reference : symbol.ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat)); 68return (((type as ISymbolInternal) ?? (type as Cci.IReference)?.GetInternalSymbol()) is ISymbolInternal symbol) ? symbol.GetISymbol().ToDisplayString(SymbolDisplayFormat.ILVisualizationFormat) : type.ToString();
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\Symbol.vb (1)
1325Private Function ISymbol_ToDisplayString(Optional format As SymbolDisplayFormat = Nothing) As String Implements ISymbol.ToDisplayString
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamespaceGenerator.vb (1)
131Return SyntaxFactory.ParseName(symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicAddImportsService.vb (1)
56result.Add(generator.NamespaceImportDeclaration(import.ToDisplayString()))
Microsoft.CodeAnalysis.VisualBasic.Features (7)
AddImport\VisualBasicAddImportFeatureService.vb (1)
198Return ($"Imports {symbol.ToDisplayString()}",
CodeLens\VisualBasicDisplayInfoService.vb (1)
67Return If(symbol Is Nothing, FeaturesResources.paren_Unknown_paren, symbol.ToDisplayString(Format))
Completion\CompletionProviders\CrefCompletionProvider.vb (1)
219builder.Append(symbol.ToDisplayString(s_crefFormat))
ExtractInterface\VisualBasicExtractInterfaceService.vb (1)
55Dim fullDisplayName = namespaceSymbol.ToDisplayString()
NavigationBar\VisualBasicNavigationBarItemService.vb (3)
248Dim name = type.ToDisplayString(_typeFormat) 251name &= " (" & type.ContainingType.ToDisplayString() & ")" 420method.ToDisplayString(displayFormat),
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (65)
Compilation\CompilationAPITests.vb (14)
1447Assert.Equal("A.B", c1.GetTypeByMetadataName("A+B").ToDisplayString()) 1592Assert.Equal("<anonymous type: m1 As Integer, m2 As Integer>", type.ToDisplayString()) 1616Assert.Equal("<anonymous type: m1 As Integer, m2 As Integer>", type.ToDisplayString()) 1639Assert.Equal("<anonymous type: Key m1 As Integer>", type.ToDisplayString()) 1654Assert.Equal("<anonymous type: m1 As Integer>", type.ToDisplayString()) 1668Assert.Equal("<anonymous type: Key m1 As Integer, Key m2 As Boolean>", type.ToDisplayString()) 1748Dim result = op.ToDisplayString() 1764Dim result = op.ToDisplayString() 1773Dim result = op.ToDisplayString() 1783Dim result = op.ToDisplayString() 1794Dim result = op.ToDisplayString() 1810Dim result = op.ToDisplayString() 1853Dim result = op.ToDisplayString() 1897Dim result = op.ToDisplayString()
Compilation\SemanticModelAPITests.vb (4)
1732Assert.Equal(expectedTypeDisplayString, symbol.ToDisplayString()) 1737Assert.Equal(expectedTypeDisplayString, symbol.ToDisplayString()) 1747Assert.Equal(expectedTypeDisplayString, symbol.ToDisplayString()) 1752Assert.Equal(expectedTypeDisplayString, symbol.ToDisplayString())
FlowAnalysis\TryLockUsingStatementTests.vb (46)
1743Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 1744Assert.Equal("lock", dataFlowAnalysisResults.DataFlowsIn(1).ToDisplayString) 1749Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 1750Assert.Equal("lock", dataFlowAnalysisResults.ReadInside(1).ToDisplayString) 1757Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 1758Assert.Equal("lock", dataFlowAnalysisResults.WrittenOutside(1).ToDisplayString) 1792Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 1797Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 1800Assert.Equal("lock", dataFlowAnalysisResults.ReadOutside(0).ToDisplayString) 1806Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 1807Assert.Equal("lock", dataFlowAnalysisResults.WrittenOutside(1).ToDisplayString) 1843Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 1844Assert.Equal("lock", dataFlowAnalysisResults.DataFlowsIn(1).ToDisplayString) 1849Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 1850Assert.Equal("lock", dataFlowAnalysisResults.ReadInside(1).ToDisplayString) 1857Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 1858Assert.Equal("lock", dataFlowAnalysisResults.WrittenOutside(1).ToDisplayString) 2204Assert.Equal("goo1", dataFlowAnalysisResults.AlwaysAssigned(0).ToDisplayString) 2205Assert.Equal("goo2", dataFlowAnalysisResults.AlwaysAssigned(1).ToDisplayString) 2210Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 2215Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 2216Assert.Equal("goo1", dataFlowAnalysisResults.ReadInside(1).ToDisplayString) 2217Assert.Equal("goo2", dataFlowAnalysisResults.ReadInside(2).ToDisplayString) 2222Assert.Equal("goo1", dataFlowAnalysisResults.VariablesDeclared(0).ToDisplayString) 2223Assert.Equal("goo2", dataFlowAnalysisResults.VariablesDeclared(1).ToDisplayString) 2226Assert.Equal("goo1", dataFlowAnalysisResults.WrittenInside(0).ToDisplayString) 2227Assert.Equal("goo2", dataFlowAnalysisResults.WrittenInside(1).ToDisplayString) 2230Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 2274Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 2279Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 2288Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 2332Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 2337Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 2340Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 2341Assert.Equal("goo1", dataFlowAnalysisResults.WrittenOutside(1).ToDisplayString) 2348Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 2349Assert.Equal("goo1", dataFlowAnalysisResults.WrittenOutside(1).ToDisplayString) 2390Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 2395Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 2396Assert.Equal("goo1", dataFlowAnalysisResults.ReadInside(1).ToDisplayString) 2397Assert.Equal("goo2", dataFlowAnalysisResults.ReadInside(2).ToDisplayString) 2402Assert.Equal("goo1", dataFlowAnalysisResults.VariablesDeclared(0).ToDisplayString) 2403Assert.Equal("goo2", dataFlowAnalysisResults.VariablesDeclared(1).ToDisplayString) 2406Assert.Equal("goo1", dataFlowAnalysisResults.WrittenInside(0).ToDisplayString) 2407Assert.Equal("goo2", dataFlowAnalysisResults.WrittenInside(1).ToDisplayString) 2410Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString)
Semantics\MeMyBaseMyClassTests.vb (1)
587Assert.Equal(expectedTypeInfo, typeInfo.Type.ToDisplayString())
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (20)
DocumentationComments\DocCommentTests.vb (2)
1115Assert.Equal("Public Sub Main()", TryCast(model, SemanticModel).GetEnclosingSymbol(names(0).SpanStart).ToDisplayString()) 11904Assert.Equal(e.Target, actual.Target.ToDisplayString)
SymbolsTests\AnonymousTypes\AnonymousTypesSemanticsTests.vb (18)
983Assert.Equal("Public ReadOnly Property aa As Integer", info.Symbol.ToDisplayString()) 1006Assert.Equal("Public ReadOnly Property aa As Integer", info.Symbol.ToDisplayString()) 1009Assert.Equal("Public Property bb As Integer", info.Symbol.ToDisplayString()) 1012Assert.Equal("Public ReadOnly Property aa As Integer", info.Symbol.ToDisplayString()) 1037Assert.Equal("Public Property a As Integer", info.Symbol.ToDisplayString()) 1040Assert.Equal("args As String()", info.Symbol.ToDisplayString()) 1043Assert.Equal("Public Property b As String", info.Symbol.ToDisplayString()) 1046Assert.Equal("Public Property args As String()", info.Symbol.ToDisplayString()) 1049Assert.Equal("Public Property a As Integer", info.Symbol.ToDisplayString()) 1073Assert.Equal("Public Sub New()", info.Symbol.ToDisplayString()) 1076Assert.Equal("Program", info.Symbol.ToDisplayString()) 1100Assert.Equal("Public Sub New()", info.Symbol.ToDisplayString()) 1103Assert.Equal("Program", info.Symbol.ToDisplayString()) 1134Assert.Equal("Public ReadOnly Property aa As Integer", info.Symbol.ToDisplayString()) 1163Assert.Equal("Public ReadOnly Property aa As Integer", info.Symbol.ToDisplayString()) 1187Assert.Equal("Public ReadOnly Property aa As String", info.Symbol.ToDisplayString()) 1216Assert.Equal("Public ReadOnly Property aa As String", info.Symbol.ToDisplayString()) 1272Assert.Equal("Public Sub New(aa As Integer, bb As Integer)", info.Symbol.ToDisplayString())
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
CompilationTestUtils.vb (1)
1223Assert.Equal(symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat), description)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
Simplification\VisualBasicSimplificationService.Expander.vb (1)
253Dim containingType = reducedExtensionMethod.ContainingType.ToDisplayString(symbolDisplayFormat)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamespaceGenerator.vb (1)
131Return SyntaxFactory.ParseName(symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicAddImportsService.vb (1)
56result.Add(generator.NamespaceImportDeclaration(import.ToDisplayString()))
Utilities\IntrinsicOperators\PredefinedCastExpressionDocumentation.vb (1)
19Return String.Format(VBWorkspaceResources.Converts_an_expression_to_the_0_data_type, _resultingType.ToDisplayString())
Microsoft.CodeAnalysis.Workspaces (8)
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (1)
259return container.ToDisplayString(DottedNameFormat);
FindSymbols\SymbolFinder_Helpers.cs (1)
175: $"{candidate.ContainingNamespace.ToDisplayString(SymbolDisplayFormats.SignatureFormat)}.{candidate.MetadataName}";
Rename\ConflictEngine\ConflictResolver.cs (1)
394return symbol.ToDisplayString(s_metadataSymbolDisplayFormat);
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
627var newMetadataName = symbol.ToDisplayString(s_metadataSymbolDisplayFormat);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamespaceOrTypeSymbolExtensions.cs (1)
23=> symbol.ToDisplayString(s_shortNameFormat);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
20=> symbol.ToDisplayString(SymbolDisplayFormats.NameFormat); 23=> symbol.ToDisplayString(SymbolDisplayFormats.SignatureFormat);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
101.NamespaceImportDeclaration(namespaceSymbol.ToDisplayString(SymbolDisplayFormats.NameFormat))
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SymbolKeyTests.cs (2)
335symbols.Select(s => s.ToDisplayString())); 377TestRoundTrip(GetDeclaredSymbols(compilation).OfType<IFieldSymbol>().Select(fs => fs.Type), compilation, s => s.ToDisplayString());
Microsoft.DotNet.CodeAnalysis (1)
Helpers.cs (1)
35return symbol.ToDisplayString(s_publicApiFormat);
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
379string typeName = paramTypeSymbol.ToDisplayString(
Microsoft.Extensions.Options.SourceGeneration (12)
Parser.cs (12)
187=> type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier)); 190=> type.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat.AddGenericsOptions(SymbolDisplayGenericsOptions.IncludeTypeParameters)); 193=> type.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat.WithGenericsOptions(SymbolDisplayGenericsOptions.None)); 284&& !baseType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat).StartsWith("global::System.", StringComparison.Ordinal)) 375transValidatorTypeName = transValidatorType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); 438enumerationValidatorTypeName = enumerationValidatorType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); 475Diag(DiagDescriptors.InaccessibleValidationAttribute, location, attributeType.Name, member.OriginalDefinition.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat), validatorType.Name); 479string attributeFullQualifiedName = attributeType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); 607trackedTypeList!.Add(memberType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)); 625trackedTypeList!.Add((modelType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), (string)attribute.ConstructorArguments[0].Value!)); 819return $"typeof({sym.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)})"; 832return $"({type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}){Convert.ToString(value, CultureInfo.InvariantCulture)}";
Microsoft.Gen.ComplianceReports (3)
Parser.cs (1)
94var result = typeSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
src\Generators\Shared\GeneratorUtilities.cs (2)
125attributeType.OriginalDefinition.ToDisplayString() : 126attributeType.ToDisplayString();
Microsoft.Gen.ContextualOptions (2)
src\Generators\Shared\GeneratorUtilities.cs (2)
125attributeType.OriginalDefinition.ToDisplayString() : 126attributeType.ToDisplayString();
Microsoft.Gen.Logging (13)
Parsing\Parser.cs (2)
555string typeName = paramTypeSymbol.ToDisplayString( 562.Select(x => x!.ToDisplayString()));
Parsing\Parser.LogProperties.cs (7)
166classification.UnionWith(GetDataClassificationAttributes(current, symbols).Select(x => x.ToDisplayString())); 170classification.UnionWith(GetDataClassificationAttributes(property, symbols).Select(x => x.ToDisplayString())); 175classification.UnionWith(dataClassesFromCtor.Select(x => x.ToDisplayString())); 199Type = property.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), 264Diag(DiagDescriptors.LogPropertiesCycleDetected, paramSymbol.GetLocation(), paramName, namedType.ToDisplayString(), property.Type.ToDisplayString(), lm.Name); 351Diag(DiagDescriptors.InvalidTypeToLogProperties, sym.GetLocation(), symType.ToDisplayString());
Parsing\Parser.TagProvider.cs (2)
39lp.TagProvider = new(providerMethod.Name, providerType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)); 67lp.TagProvider = new(providerMethod.Name, providerType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
src\Generators\Shared\GeneratorUtilities.cs (2)
125attributeType.OriginalDefinition.ToDisplayString() : 126attributeType.ToDisplayString();
Microsoft.Gen.Logging.Unit.Tests (1)
LogParserUtilitiesTests.cs (1)
158paramTypeMock.Setup(x => x.ToDisplayString(It.IsAny<SymbolDisplayFormat>()))
Microsoft.Gen.Metrics (8)
Parser.cs (6)
448GenericType = genericType.ToDisplayString(_genericTypeSymbolFormat), 452MetricTypeName = methodSymbol.ReturnType.ToDisplayString(), // Roslyn doesn't know this type yet, no need to use a format here 542Type = paramTypeSymbol.ToDisplayString(_typeSymbolFormat), 652strongTypeSymbol.ToDisplayString(), 653ex.Parent.ToDisplayString(), 654ex.NamedType.ToDisplayString());
src\Generators\Shared\GeneratorUtilities.cs (2)
125attributeType.OriginalDefinition.ToDisplayString() : 126attributeType.ToDisplayString();
Microsoft.Gen.MetricsReports (8)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (6)
448GenericType = genericType.ToDisplayString(_genericTypeSymbolFormat), 452MetricTypeName = methodSymbol.ReturnType.ToDisplayString(), // Roslyn doesn't know this type yet, no need to use a format here 542Type = paramTypeSymbol.ToDisplayString(_typeSymbolFormat), 652strongTypeSymbol.ToDisplayString(), 653ex.Parent.ToDisplayString(), 654ex.NamedType.ToDisplayString());
src\Generators\Shared\GeneratorUtilities.cs (2)
125attributeType.OriginalDefinition.ToDisplayString() : 126attributeType.ToDisplayString();
Microsoft.Interop.ComInterfaceGenerator (37)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
76AttributeData comImportAttribute = type.GetAttributes().First(attr => attr.AttributeClass.ToDisplayString() == TypeNames.System_Runtime_InteropServices_ComImportAttribute);
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (2)
60switch (ctorArg0.Type.ToDisplayString()) 80if (attr.AttributeClass?.ToDisplayString() == attributeDisplayName)
ComClassInfo.cs (5)
39type.ToDisplayString())); 45AttributeData? generatedComInterfaceAttribute = iface.GetAttributes().FirstOrDefault(attr => attr.AttributeClass?.ToDisplayString() == TypeNames.GeneratedComInterfaceAttribute); 51names.Add(iface.ToDisplayString()); 60type.ToDisplayString())); 65type.ToDisplayString(),
ComInterfaceInfo.cs (16)
78symbol.ToDisplayString(), 100symbol.ToDisplayString(), 101baseSymbol?.ToDisplayString(), 127symbol.ToDisplayString(), 128baseSymbol.ToDisplayString())); 159thisSymbol.ToDisplayString(), 160baseSymbol?.ToDisplayString(), 209interfaceSymbol.ToDisplayString(), 228interfaceSymbol.ToDisplayString(), 243interfaceSymbol.ToDisplayString(), 265interfaceSymbol.ToDisplayString(), 279interfaceSymbol.ToDisplayString(), 299if (attr.AttributeClass?.ToDisplayString() == TypeNames.GeneratedComInterfaceAttribute) 312comIface.ToDisplayString()); 333var attrDisplayString = attr.AttributeClass?.ToDisplayString(); 354interfaceSymbol.ToDisplayString());
ComMethodInfo.cs (5)
53methods.Add(DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(member.CreateDiagnosticInfo(GeneratorDiagnostics.InstancePropertyDeclaredInInterface, member.Name, data.ifaceSymbol.ToDisplayString()))); 56methods.Add(DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(member.CreateDiagnosticInfo(GeneratorDiagnostics.InstanceEventDeclaredInInterface, member.Name, data.ifaceSymbol.ToDisplayString()))); 80return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, comMethodDeclaringSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString()); 119return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(DiagnosticInfo.Create(GeneratorDiagnostics.MethodNotDeclaredInAttributedInterface, method.Locations.FirstOrDefault(), method.ToDisplayString())); 135return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(DiagnosticInfo.Create(GeneratorDiagnostics.CannotAnalyzeMethodPattern, method.Locations.FirstOrDefault(), method.ToDisplayString()));
GeneratedComInterfaceAttributeData.cs (2)
45&& attr.AttributeClass?.ToDisplayString() == TypeNames.GeneratedComInterfaceAttribute) 62Debug.Assert(attr.AttributeClass.ToDisplayString() == TypeNames.GeneratedComInterfaceAttribute);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (3)
245&& !parameter.GetAttributes().Any(attr => attr.AttributeClass?.ToDisplayString() == TypeNames.System_Runtime_InteropServices_MarshalAsAttribute)) 254&& !methodSymbol.GetReturnTypeAttributes().Any(attr => attr.AttributeClass?.ToDisplayString() == TypeNames.System_Runtime_InteropServices_MarshalAsAttribute)) 275&& !methodSymbol.GetReturnTypeAttributes().Any(attr => attr.AttributeClass?.ToDisplayString() == TypeNames.System_Runtime_InteropServices_MarshalAsAttribute))
VtableIndexStubGenerator.cs (3)
213&& attr.AttributeClass.ToDisplayString() == TypeNames.VirtualMethodIndexAttribute) 305var unwrapperSyntax = ParseTypeName(unmanagedObjectUnwrapper.AttributeClass.TypeArguments[0].ToDisplayString()); 415return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.JavaScript.JSImportGenerator (12)
JSExportGenerator.cs (2)
181&& attr.AttributeClass.ToDisplayString() == Constants.JSExportAttribute) 359return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
JSImportGenerator.cs (2)
161&& attr.AttributeClass.ToDisplayString() == Constants.JSImportAttribute) 238return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
JSManagedTypeInfo.cs (1)
16string fullTypeName = type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
JSMarshalAsAttributeInfoParser.cs (3)
29string gt = jsTypeArgs.ConstructUnboundGenericType().ToDisplayString(); 35foreach (var ta in jsTypeArgs.TypeArguments.Cast<INamedTypeSymbol>().Select(x => x.ToDisplayString())) 45string st = jsTypeArgs.ToDisplayString();
JSSignatureContext.cs (4)
47string stubTypeFullName = method.ContainingType.ToDisplayString(TypeContainingTypesAndNamespacesStyle); 63var fullName = $"{method.ContainingType.ToDisplayString()}.{method.Name}"; 81string typeName = method.ContainingType.ToDisplayString(TypeAndContainingTypesStyle).Replace(".", "/"); 84typeName = $"{method.ContainingType.ContainingNamespace.ToDisplayString()}.{typeName}";
Microsoft.Interop.LibraryImportGenerator (74)
Analyzers\ConvertToLibraryImportAnalyzer.cs (3)
142AttributeData dllImportAttribute = method.GetAttributes().First(attr => attr.AttributeClass.ToDisplayString() == TypeNames.DllImportAttribute); 186AttributeData? bestFitMappingContainingType = method.ContainingType.GetAttributes().FirstOrDefault(attr => attr.AttributeClass.ToDisplayString() == TypeNames.System_Runtime_InteropServices_BestFitMappingAttribute); 192AttributeData? bestFitMappingContainingAssembly = method.ContainingAssembly.GetAttributes().FirstOrDefault(attr => attr.AttributeClass.ToDisplayString() == TypeNames.System_Runtime_InteropServices_BestFitMappingAttribute);
Analyzers\CustomMarshallerAttributeAnalyzer.cs (53)
653managedTypeReporter.CreateAndReportDiagnostic(ManagedTypeMustBeNonNullRule, entryType.ToDisplayString()); 674marshallerTypeReporter.CreateAndReportDiagnostic(MarshallerTypeMustBeNonNullRule, entryType.ToDisplayString()); 720diagnosticReporter.CreateAndReportDiagnostic(MarshallerTypeMustBeStaticClassOrStructRule, marshallerType.ToDisplayString()); 777marshallerType.ToDisplayString(), 779managedType.ToDisplayString()); 797marshallerType.ToDisplayString(), 799managedType.ToDisplayString()); 809marshallerType.ToDisplayString(), 811managedType.ToDisplayString()); 835marshallerType.ToDisplayString(), 837managedType.ToDisplayString()); 855marshallerType.ToDisplayString(), 857managedType.ToDisplayString()); 868marshallerType.ToDisplayString(), 870managedType.ToDisplayString()); 889diagnosticReporter.CreateAndReportDiagnostic(UnmanagedTypeMustBeUnmanagedRule, toUnmanagedMethod.ToDisplayString()); 896diagnosticReporter.CreateAndReportDiagnostic(FirstParameterMustMatchReturnTypeRule, methods.UnmanagedValuesDestination.ToDisplayString(), toUnmanagedMethod.ToDisplayString()); 905diagnosticReporter.CreateAndReportDiagnostic(ReturnTypesMustMatchRule, methods.ToUnmanaged.ToDisplayString(), methods.ToUnmanagedWithBuffer.ToDisplayString()); 918diagnosticReporter.CreateAndReportDiagnostic(FirstParameterMustMatchReturnTypeRule, toManagedMethod.ToDisplayString(), (methods.ToUnmanaged ?? methods.ToUnmanagedWithBuffer).ToDisplayString()); 927diagnosticReporter.CreateAndReportDiagnostic(FirstParametersMustMatchRule, methods.UnmanagedValuesSource.ToDisplayString(), toManagedMethod.ToDisplayString()); 936diagnosticReporter.CreateAndReportDiagnostic(FirstParametersMustMatchRule, methods.ToManaged.ToDisplayString(), methods.ToManagedFinally.ToDisplayString()); 951diagnosticReporter.CreateAndReportDiagnostic(ElementTypesOfReturnTypesMustMatchRule, methods.ManagedValuesSource.ToDisplayString(), methods.ManagedValuesDestination.ToDisplayString()); 969diagnosticReporter.CreateAndReportDiagnostic(ReturnTypeMustBeExpectedTypeRule, unmanagedValuesCollectionMethod.ToDisplayString(), expectedSpanType.Construct(expectedElementType).ToDisplayString()); 991marshallerType.ToDisplayString(), 992allocatedBufferType.TypeArguments[0].ToDisplayString()); 1015diagnosticReporter.CreateAndReportDiagnostic(ElementMarshallerCannotBeStatefulRule, marshallerType.ToDisplayString(), mode); 1068marshallerType.ToDisplayString(), 1070managedType.ToDisplayString()); 1079marshallerType.ToDisplayString(), 1081managedType.ToDisplayString()); 1105marshallerType.ToDisplayString(), 1107managedType.ToDisplayString()); 1129marshallerType.ToDisplayString(), 1131managedType.ToDisplayString()); 1141marshallerType.ToDisplayString(), 1143managedType.ToDisplayString()); 1150marshallerType.ToDisplayString()); 1174marshallerType.ToDisplayString(), 1176managedType.ToDisplayString()); 1189marshallerType.ToDisplayString()); 1205diagnosticReporter.CreateAndReportDiagnostic(UnmanagedTypeMustBeUnmanagedRule, methods.ToUnmanaged.ToDisplayString()); 1216diagnosticReporter.CreateAndReportDiagnostic(FirstParameterMustMatchReturnTypeRule, fromUnmanagedMethod.ToDisplayString(), methods.ToUnmanaged.ToDisplayString()); 1224diagnosticReporter.CreateAndReportDiagnostic(UnmanagedTypeMustBeUnmanagedRule, fromUnmanagedMethod.ToDisplayString()); 1239diagnosticReporter.CreateAndReportDiagnostic(ElementTypesOfReturnTypesMustMatchRule, methods.ManagedValuesSource.ToDisplayString(), methods.ManagedValuesDestination.ToDisplayString());
Analyzers\NativeMarshallingAttributeAnalyzer.cs (12)
88&& attrCreation.Type.ToDisplayString() == TypeNames.NativeMarshallingAttribute) 96GetSymbolType(context.ContainingSymbol!).ToDisplayString()); 117entryType.ToDisplayString(), 118managedType.ToDisplayString()); 129entryType.ToDisplayString(), 130managedType.ToDisplayString()); 139entryType.ToDisplayString(), 140managedType.ToDisplayString()), 155entryType.ToDisplayString(), 156managedType.ToDisplayString()), out _)) 160entryType.ToDisplayString(), 161managedType.ToDisplayString());
Analyzers\ShapeBreakingDiagnosticSuppressor.cs (1)
61attr => attr.AttributeClass?.ToDisplayString() == TypeNames.CustomMarshallerAttribute
LibraryImportGenerator.cs (2)
241&& attr.AttributeClass.ToDisplayString() == TypeNames.LibraryImportAttribute) 562return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (3)
245&& !parameter.GetAttributes().Any(attr => attr.AttributeClass?.ToDisplayString() == TypeNames.System_Runtime_InteropServices_MarshalAsAttribute)) 254&& !methodSymbol.GetReturnTypeAttributes().Any(attr => attr.AttributeClass?.ToDisplayString() == TypeNames.System_Runtime_InteropServices_MarshalAsAttribute)) 275&& !methodSymbol.GetReturnTypeAttributes().Any(attr => attr.AttributeClass?.ToDisplayString() == TypeNames.System_Runtime_InteropServices_MarshalAsAttribute))
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
DownlevelLibraryImportGenerator.cs (2)
176&& attr.AttributeClass.ToDisplayString() == TypeNames.LibraryImportAttribute) 432return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.SourceGeneration (35)
ComInterfaceMarshallingInfoProvider.cs (1)
24public bool CanParseAttributeType(INamedTypeSymbol attributeType) => attributeType.ToDisplayString() == TypeNames.GeneratedComInterfaceAttribute;
CompilationExtensions.cs (2)
17if (compilation.SourceModule.GetAttributes().Any(attr => attr.AttributeClass.ToDisplayString() == TypeNames.System_Runtime_CompilerServices_SkipLocalsInitAttribute)) 21if (compilation.SourceModule.GetAttributes().Any(attr => attr.AttributeClass.ToDisplayString() == TypeNames.System_Runtime_CompilerServices_DisableRuntimeMarshallingAttribute))
CustomMarshallingInfoHelper.cs (12)
32diagnostics.ReportInvalidMarshallingAttributeInfo(attrData, nameof(SR.MarshallerTypeMustBeStaticClassOrStruct), entryPointType.ToDisplayString(), type.ToDisplayString()); 50diagnostics.ReportInvalidMarshallingAttributeInfo(attrData, nameof(SR.MarshallerEntryPointTypeMustMatchArity), entryPointType.ToDisplayString(), type.ToDisplayString()); 64(type, entryPointType) => diagnostics.ReportInvalidMarshallingAttributeInfo(attrData, nameof(SR.MarshallerEntryPointTypeMustMatchArity), entryPointType.ToDisplayString(), type.ToDisplayString()), 74diagnostics.ReportInvalidMarshallingAttributeInfo(attrData, nameof(SR.MarshallerEntryPointTypeMustMatchArity), entryPointType.ToDisplayString(), type.ToDisplayString()); 96(type, entryPointType) => diagnostics.ReportInvalidMarshallingAttributeInfo(attrData, nameof(SR.MarshallerEntryPointTypeMustMatchArity), entryPointType.ToDisplayString(), type.ToDisplayString()), 148diagnostics.ReportInvalidMarshallingAttributeInfo(attrData, nameof(SR.MarshallerTypeMustBeStaticClassOrStruct), entryPointType.ToDisplayString(), type.ToDisplayString());
ISymbolExtensions.cs (2)
20details = string.Format(SR.TypeAccessibilityDetails, symbol.ToDisplayString(), symbol.DeclaredAccessibility.ToString().ToLowerInvariant()); 28details = string.Format(SR.ContainingTypeAccessibilityDetails, current.ToDisplayString(), current.DeclaredAccessibility.ToString().ToLowerInvariant());
ManagedTypeInfo.cs (2)
42string typeName = type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); 43string diagnosticFormattedName = type.ToDisplayString();
ManualTypeMarshallingHelper.cs (4)
86&& entryPointType.GetAttributes().Any(attr => attr.AttributeClass.ToDisplayString() == TypeNames.ContiguousCollectionMarshallerAttribute); 91return entryPointType.GetAttributes().Any(attr => attr.AttributeClass.ToDisplayString() == TypeNames.CustomMarshallerAttribute); 155var attrs = entryPointType.GetAttributes().Where(attr => attr.AttributeClass.ToDisplayString() == TypeNames.CustomMarshallerAttribute).ToArray(); 378if (innerType.ToDisplayString() != TypeNames.CustomMarshallerAttributeGenericPlaceholder)
MarshalAsParser.cs (1)
131public bool CanParseAttributeType(INamedTypeSymbol attributeType) => attributeType.ToDisplayString() == TypeNames.System_Runtime_InteropServices_MarshalAsAttribute;
MarshalAsWithCustomMarshallersParser.cs (1)
35public bool CanParseAttributeType(INamedTypeSymbol attributeType) => attributeType.ToDisplayString() == TypeNames.System_Runtime_InteropServices_MarshalAsAttribute;
MarshalUsingAttributeParser.cs (2)
26public bool CanParseAttributeType(INamedTypeSymbol attributeType) => attributeType.ToDisplayString() == TypeNames.MarshalUsingAttribute; 30Debug.Assert(attributeData.AttributeClass!.ToDisplayString() == TypeNames.MarshalUsingAttribute);
NativeMarshallingAttributeParser.cs (2)
20public bool CanParseAttributeType(INamedTypeSymbol attributeType) => attributeType.ToDisplayString() == TypeNames.NativeMarshallingAttribute; 24Debug.Assert(attributeData.AttributeClass!.ToDisplayString() == TypeNames.NativeMarshallingAttribute);
SignatureContext.cs (1)
173=> a.AttributeClass?.ToDisplayString() == TypeNames.System_Runtime_CompilerServices_SkipLocalsInitAttribute;
TypeSymbolExtensions.cs (5)
76if (t.ToDisplayString() is TypeNames.System_Runtime_InteropServices_CLong // CLong is an interop intrinsic type for the C long type 85if (t.ToDisplayString() == TypeNames.System_Guid) // .NET has established that Guid is blittable and matches the shape of the Win32 GUID type exactly and always will. 126else if (attr.AttributeClass.ToDisplayString() == "System.Runtime.InteropServices.NativeMarshallingAttribute") 139if (attr.AttributeClass.ToDisplayString() == "System.Runtime.InteropServices.StructLayoutAttribute") 172return SyntaxFactory.ParseTypeName(type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
Microsoft.VisualStudio.LanguageServices (41)
CallHierarchy\CallHierarchyItem.cs (4)
44ContainingTypeName = symbol.ContainingType.ToDisplayString(ContainingTypeFormat); 45ContainingNamespaceName = symbol.ContainingNamespace.ToDisplayString(ContainingNamespaceFormat); 47MemberName = symbol.ToDisplayString(MemberNameFormat); 49SortText = symbol.ToDisplayString();
CallHierarchy\Finders\BaseMemberFinder.cs (1)
24_text = string.Format(EditorFeaturesResources.Calls_To_Base_Member_0, symbol.ToDisplayString());
CallHierarchy\Finders\InterfaceImplementationCallFinder.cs (1)
25_text = string.Format(EditorFeaturesResources.Calls_To_Interface_Implementation_0, symbol.ToDisplayString());
ChangeSignature\AddParameterDialogViewModel.cs (1)
58public string? TypeName => TypeSymbol?.ToDisplayString(s_symbolDisplayFormat);
ChangeSignature\ChangeSignatureDialogViewModel.ParameterViewModels.cs (1)
218public override string Type => ParameterSymbol.Type.ToDisplayString(s_parameterDisplayFormat);
ExtractClass\VisualStudioExtractClassOptionsService.cs (1)
75: selectedType.ContainingNamespace.ToDisplayString();
Implementation\ContainedLanguageRefactorNotifyService.cs (1)
51GetRenameType(symbol), symbol.ToDisplayString(s_qualifiedDisplayFormat), newName);
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (3)
77var text = namespaceSymbol.ToDisplayString(); 94AddName(typeSymbol.ToDisplayString(s_typeDisplay)); 120var text = typeSymbol.ToDisplayString(typeDisplayFormat);
Library\ObjectBrowser\AbstractListItemFactory.cs (11)
61? namedTypeSymbol.ToDisplayString(s_simplePredefinedTypeDisplay) 62: namedTypeSymbol.ToDisplayString(s_simpleNormalTypeDisplay); 72var searchText = memberSymbol.ToDisplayString(s_searchFormat); 92var searchText = memberSymbol.ToDisplayString(s_searchFormat); 102? namedTypeSymbol.ToDisplayString(s_simplePredefinedTypeFullName) 103: namedTypeSymbol.ToDisplayString(s_simpleNormalTypeFullName); 105var searchText = namedTypeSymbol.ToDisplayString(s_searchFormat); 113? namedTypeSymbol.ToDisplayString(s_predefinedTypeDisplay) 114: namedTypeSymbol.ToDisplayString(s_normalTypeDisplay); 118var searchText = namedTypeSymbol.ToDisplayString(s_searchFormat); 125var text = namespaceSymbol.ToDisplayString();
Library\ObjectBrowser\Extensions.cs (3)
32? memberSymbol.ToDisplayString(s_memberDisplayFormat) 44? namespaceSymbol.ToDisplayString() 51? typeSymbol.ToDisplayString(s_typeDisplayFormat)
Library\VsNavInfo\NavInfoFactory.cs (3)
228? namespaceSymbol.ToDisplayString() 235? typeSymbol.ToDisplayString(LibraryService.TypeDisplayFormat) 242? memberSymbol.ToDisplayString(LibraryService.MemberDisplayFormat)
MoveStaticMembers\TypeNameItem.cs (1)
25TypeName = type.ToDisplayString();
MoveStaticMembers\VisualStudioMoveStaticMembersOptionsService.cs (1)
122: selectedType.ContainingNamespace.ToDisplayString();
Progression\GraphBuilder.cs (1)
419node.Label = symbol.ToDisplayString();
Progression\GraphNodeIdCreation.cs (3)
46builder.Namespace = symbol.ToDisplayString(); 91items.Add(GraphNodeId.GetPartial(CodeGraphNodeIdName.Namespace, typeParameter.ContainingNamespace.ToDisplayString())); 112items.Add(GraphNodeId.GetPartial(CodeGraphNodeIdName.Namespace, underlyingType.ContainingNamespace.ToDisplayString()));
PullMemberUp\MainDialog\BaseTypeTreeNodeViewModel.cs (1)
34public string Namespace => string.Format(ServicesVSResources.Namespace_0, Symbol.ContainingNamespace?.ToDisplayString() ?? "global");
Utilities\SymbolViewModel.cs (2)
47public string SymbolName => Symbol.ToDisplayString(s_symbolDisplayFormat); 51public string SymbolAutomationText => Symbol.ToDisplayString(s_symbolAutomationFormat);
Venus\ContainedLanguageCodeSupport.cs (2)
53baseClassName = type.BaseType.ToDisplayString(); 450return string.Format("{0}({1})", member.Name, string.Join(",", ((IMethodSymbol)member).Parameters.Select(p => p.Type.ToDisplayString())));
Microsoft.VisualStudio.LanguageServices.CSharp (15)
CodeModel\CSharpCodeModelService.cs (6)
767=> typeSymbol.ToDisplayString(s_codeTypeRefAsFullNameFormat); 770=> typeSymbol.ToDisplayString(s_codeTypeRefAsStringFormat); 1018return symbol.ToDisplayString(s_externalNameFormat); 1028return symbol.ToDisplayString(s_externalFullNameFormat); 2742var typeName = typeSymbol.ToDisplayString(s_setTypeFormat); 3067SyntaxFactory.ParseTypeName(type.ToDisplayString())));
ObjectBrowser\DescriptionBuilder.cs (4)
30AddName(namespaceSymbol.ToDisplayString()); 53AddName(typeSymbol.ToDisplayString(typeNameFormat)); 95AddName(typeSymbol.ToDisplayString(typeNameFormat)); 223AddName(methodSymbol.ToDisplayString(methodNameFormat));
ObjectBrowser\ListItemFactory.cs (2)
31=> memberSymbol.ToDisplayString(s_memberDisplayFormat); 34=> memberSymbol.ToDisplayString(s_memberWithContainingTypeDisplayFormat);
Progression\CSharpProgressionLanguageService.cs (3)
96var label = symbol.ToDisplayString(displayFormat); 102label += " : " + typeToShow.ToDisplayString(s_labelFormat); 107label += " (" + symbol.ContainingSymbol.ToDisplayString(s_labelFormat) + ")";
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
VsNavInfo\VsNavInfoTests.vb (1)
840Assert.True(navInfo IsNot Nothing, $"Could not retrieve nav info for {symbol.ToDisplayString()}")
Microsoft.VisualStudio.LanguageServices.VisualBasic (32)
CodeModel\Extenders\GenericExtender.vb (3)
73Return baseTypeSymbol.ToDisplayString() 81typeSymbol.Interfaces(index).ToDisplayString(), 90typeSymbol.Interfaces(index).ToDisplayString(),
CodeModel\MethodXML\MethodXmlBuilder.vb (1)
343Return symbol.ContainingSymbol.ToDisplayString(s_fullNameFormat) & "." & symbol.Name
CodeModel\VisualBasicCodeModelService.vb (13)
820Return typeSymbol.ToDisplayString(s_codeTypeRefAsFullNameFormat) 824Return typeSymbol.ToDisplayString(s_codeTypeRefAsStringFormat) 1417Return symbol.ToDisplayString(s_externalNameFormat) 1425Return symbol.ToDisplayString(s_externalfullNameFormat) 2994Dim typeName = typeSymbol.ToDisplayString(s_setTypeFormat) 3034Dim typeName = typeSymbol.ToDisplayString(s_setTypeFormat) 3061Dim typeName = typeSymbol.ToDisplayString(s_setTypeFormat) 3164Dim newType = SyntaxFactory.ParseTypeName(typeSymbol.ToDisplayString(s_setTypeFormat)) 3216Dim typeName = typeSymbol.ToDisplayString(s_setTypeFormat) 3288Dim typeName = typeSymbol.ToDisplayString(s_setTypeFormat) 3317Dim typeName = typeSymbol.ToDisplayString(s_setTypeFormat) 3349Dim typeName = typeSymbol.ToDisplayString(s_setTypeFormat) 3400Dim typeName = typeSymbol.ToDisplayString(s_setTypeFormat)
CodeModel\VisualBasicCodeModelService_Prototype.vb (4)
162builder.Append(symbol.ToDisplayString(s_prototypeFullNameFormat)) 164builder.Append(symbol.ToDisplayString(s_prototypeTypeNameFormat)) 190builder.Append(parameter.Type.ToDisplayString(s_prototypeFullNameFormat)) 213builder.Append(type.ToDisplayString(s_prototypeFullNameFormat))
ObjectBrowser\DescriptionBuilder.vb (6)
26AddName(namespaceSymbol.ToDisplayString()) 46AddName(typeSymbol.ToDisplayString(typeNameFormat)) 86AddName(typeSymbol.ToDisplayString(typeNameFormat)) 138AddName(methodSymbol.ToDisplayString(methodNameFormat)) 173AddName(methodSymbol.ToDisplayString(methodNameFormat)) 207AddName(methodSymbol.ToDisplayString(methodNameFormat))
ObjectBrowser\ListItemFactory.vb (2)
29Return memberSymbol.ToDisplayString(s_memberWithContainingTypeDisplayFormat) 33Return memberSymbol.ToDisplayString(s_memberDisplayFormat)
Progression\VisualBasicProgressionLanguageService.vb (2)
86Dim label As String = symbol.ToDisplayString(displayFormat) 89label += " (" + symbol.ContainingSymbol.ToDisplayString(displayFormat) + ")"
ProjectSystemShim\VisualBasicEntryPointFinder.vb (1)
45If baseType.ToDisplayString() = "System.Windows.Forms.Form" Then
System.Private.CoreLib.Generators (4)
EventSourceGenerator.Parser.cs (1)
38attribute.AttributeClass.ToDisplayString() != EventSourceAttribute)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (3)
546context.ReportDiagnostic(Diagnostic.Create(RuleAttributeNotSpecificEnough, operation.Syntax.GetLocation(), attributeExplicitlyAllowsRelatedSymbol.ToDisplayString())); 686context.ReportDiagnostic(Diagnostic.Create(Rule, operation.Syntax.GetLocation(), symbol.ContainingSymbol.ToDisplayString())); 688context.ReportDiagnostic(Diagnostic.Create(RuleHelper, operation.Syntax.GetLocation(), symbol.ToDisplayString()));
System.Text.Json.SourceGeneration (15)
Helpers\RoslynExtensions.cs (1)
381attr.AttributeClass.ContainingNamespace.ToDisplayString() == "System.Diagnostics.CodeAnalysis");
JsonSourceGenerator.Parser.cs (12)
100ReportDiagnostic(DiagnosticDescriptors.JsonSerializableAttributeOnNonContextType, _contextClassLocation, contextTypeSymbol.ToDisplayString()); 157Namespace = contextTypeSymbol.ContainingNamespace is { IsGlobalNamespace: false } ns ? ns.ToDisplayString() : null, 197string typeName = typeSymbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat); 617ReportDiagnostic(DiagnosticDescriptors.MultipleJsonConstructorAttribute, typeToGenerate.Location, type.ToDisplayString()); 621ReportDiagnostic(DiagnosticDescriptors.JsonConstructorInaccessible, typeToGenerate.Location, type.ToDisplayString()); 640ReportDiagnostic(DiagnosticDescriptors.TypeNotSupported, typeToGenerate.AttributeLocation ?? typeToGenerate.Location, type.ToDisplayString()); 1269switch (attributeType.ToDisplayString()) 1280namedArgs[0].Value.Type?.ToDisplayString() == JsonIgnoreConditionFullName) 1568ReportDiagnostic(DiagnosticDescriptors.DerivedJsonConverterAttributesNotSupported, attributeData.GetLocation(), attributeData.AttributeClass!.ToDisplayString()); 1583ReportDiagnostic(DiagnosticDescriptors.JsonConverterAttributeInvalidType, attributeData.GetLocation(), converterType?.ToDisplayString() ?? "null", declaringSymbol.ToDisplayString()); 1589ReportDiagnostic(DiagnosticDescriptors.JsonStringEnumConverterNotSupportedInAot, attributeData.GetLocation(), declaringSymbol.ToDisplayString());
src\libraries\Common\src\Roslyn\SyntaxValueProvider_ForAttributeWithMetadataName.cs (1)
193attribute.AttributeClass?.ToDisplayString(/*s_metadataDisplayFormat*/) == fullyQualifiedMetadataName)
src\libraries\Common\src\SourceGenerators\TypeModelHelper.cs (1)
38public static string GetFullyQualifiedName(this ITypeSymbol type) => type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
System.Text.RegularExpressions.Generator (1)
RegexGenerator.Parser.cs (1)
202string? ns = regexMemberSymbol.ContainingType?.ContainingNamespace?.ToDisplayString(