9 implementations of ToDisplayString
GenerateDocumentationAndConfigFiles (1)
Microsoft.CodeAnalysis.Analyzers (1)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp (2)
Microsoft.CodeAnalysis.Features (1)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (1)
Roslyn.Diagnostics.Analyzers (1)
558 references to ToDisplayString
Aspire.Hosting.Integration.Analyzers (10)
ConfigurationSchemaGenerator (9)
EventSourceGenerator (1)
GenerateDocumentationAndConfigFiles (5)
ILLink.CodeFixProvider (1)
ILLink.RoslynAnalyzer (5)
Microsoft.Analyzers.Extra (2)
Microsoft.Analyzers.Local (9)
Microsoft.AspNetCore.Analyzers (1)
Microsoft.AspNetCore.App.Analyzers (4)
Microsoft.AspNetCore.Components.Analyzers (14)
Microsoft.AspNetCore.Components.SdkAnalyzers (11)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
Microsoft.CodeAnalysis (11)
Microsoft.CodeAnalysis.Analyzers (23)
Microsoft.CodeAnalysis.AnalyzerUtilities (9)
Microsoft.CodeAnalysis.CodeStyle (7)
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
Microsoft.CodeAnalysis.CSharp (5)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
Microsoft.CodeAnalysis.CSharp.Features (22)
QuickInfo\CSharpSemanticQuickInfoProvider.cs (4)
245(NullableAnnotation.None, _) => string.Format(FeaturesResources._0_is_not_nullable_aware, symbol.ToDisplayString(s_nullableDisplayFormat)),
246(_, NullableFlowState.MaybeNull) => string.Format(FeaturesResources._0_may_be_null_here, symbol.ToDisplayString(s_nullableDisplayFormat)),
247(_, NullableFlowState.NotNull) => string.Format(FeaturesResources._0_is_not_null_here, symbol.ToDisplayString(s_nullableDisplayFormat)),
372return new OnTheFlyDocsInfo(symbol.ToDisplayString(), declarationCode, symbol.Language, hasContentExcluded, additionalContext);
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Microsoft.CodeAnalysis.Extensions.Package (3)
Microsoft.CodeAnalysis.Features (57)
Microsoft.CodeAnalysis.Razor.Compiler (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (9)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.VisualBasic.Features (7)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
Microsoft.CodeAnalysis.Workspaces (9)
Microsoft.Diagnostics.DataContractReader.DataGenerator (15)
Microsoft.DotNet.ApiCompatibility (12)
Rules\CannotRemoveBaseTypeOrInterface.cs (4)
66string.Format(Resources.CannotRemoveBaseType, left.ToDisplayString(SymbolExtensions.DisplayFormat), leftBaseType.ToDisplayString(SymbolExtensions.DisplayFormat), rightName, leftName),
90string.Format(Resources.CannotRemoveBaseInterface, left.ToDisplayString(SymbolExtensions.DisplayFormat), leftInterface.ToDisplayString(SymbolExtensions.DisplayFormat), rightName, leftName),
Rules\MembersMustExist.cs (4)
41string.Format(Resources.TypeMissingOnSide, left.ToDisplayString(SymbolExtensions.DisplayFormat), leftMetadata, rightMetadata),
51string.Format(Resources.TypeMissingOnSide, right.ToDisplayString(SymbolExtensions.DisplayFormat), rightMetadata, leftMetadata),
70string.Format(Resources.MemberExistsOnLeft, left.ToDisplayString(SymbolExtensions.DisplayFormat), leftMetadata, rightMetadata),
83string.Format(Resources.MemberExistsOnRight, right.ToDisplayString(SymbolExtensions.DisplayFormat), leftMetadata, rightMetadata),
Microsoft.DotNet.ApiSymbolExtensions (3)
Microsoft.DotNet.CodeAnalysis (1)
Microsoft.Extensions.Logging.Generators (2)
Microsoft.Extensions.Options.SourceGeneration (12)
Microsoft.Gen.BuildMetadata (2)
Microsoft.Gen.ComplianceReports (3)
Microsoft.Gen.ContextualOptions (2)
Microsoft.Gen.Logging (13)
Parsing\Parser.LogProperties.cs (7)
165classification.UnionWith(GetDataClassificationAttributes(current, symbols).Select(x => x.ToDisplayString()));
169classification.UnionWith(GetDataClassificationAttributes(property, symbols).Select(x => x.ToDisplayString()));
174classification.UnionWith(dataClassesFromCtor.Select(x => x.ToDisplayString()));
198Type = property.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
263Diag(DiagDescriptors.LogPropertiesCycleDetected, paramSymbol.GetLocation(), paramName, namedType.ToDisplayString(), property.Type.ToDisplayString(), lm.Name);
350Diag(DiagDescriptors.InvalidTypeToLogProperties, sym.GetLocation(), symType.ToDisplayString());
Microsoft.Gen.Logging.Unit.Tests (1)
Microsoft.Gen.MetadataExtractor (10)
Microsoft.Gen.Metrics (9)
Microsoft.Gen.MetricsReports (9)
Microsoft.Interop.ComInterfaceGenerator (36)
ComInterfaceInfo.cs (17)
79symbol.ToDisplayString(),
104symbol.ToDisplayString(),
105baseSymbol?.ToDisplayString(),
131symbol.ToDisplayString(),
132baseSymbol.ToDisplayString()));
163thisSymbol.ToDisplayString(),
164baseSymbol?.ToDisplayString(),
220interfaceSymbol.ToDisplayString(),
239interfaceSymbol.ToDisplayString(),
254interfaceSymbol.ToDisplayString(),
276interfaceSymbol.ToDisplayString(),
290interfaceSymbol.ToDisplayString(),
311exceptionToUnmanagedMarshallerType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat).Replace(TypeNames.GlobalAlias, ""),
338if (attr.AttributeClass?.ToDisplayString() == TypeNames.GeneratedComInterfaceAttribute)
351comIface.ToDisplayString());
372var attrDisplayString = attr.AttributeClass?.ToDisplayString();
393interfaceSymbol.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()));
Microsoft.Interop.JavaScript.JSImportGenerator (11)
Microsoft.Interop.LibraryImportGenerator (74)
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());
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
Microsoft.Interop.SourceGeneration (35)
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());
Microsoft.Maui.Controls.BindingSourceGen (4)
Roslyn.Diagnostics.Analyzers (10)
Roslyn.Diagnostics.CSharp.Analyzers (1)
Roslyn.Diagnostics.VisualBasic.Analyzers (1)
System.Private.CoreLib.Generators (3)
System.Text.Json.SourceGeneration (26)
JsonSourceGenerator.Parser.cs (24)
112ReportDiagnostic(DiagnosticDescriptors.JsonSerializableAttributeOnNonContextType, _contextClassLocation, contextTypeSymbol.ToDisplayString());
178Namespace = contextTypeSymbol.ContainingNamespace is { IsGlobalNamespace: false } ns ? ns.ToDisplayString() : null,
218string typeName = typeSymbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat);
715ReportDiagnostic(DiagnosticDescriptors.MultipleJsonConstructorAttribute, typeToGenerate.Location, type.ToDisplayString());
783namedUnionType.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));
793ReportDiagnostic(DiagnosticDescriptors.TypeNotSupported, typeToGenerate.AttributeLocation ?? typeToGenerate.Location, type.ToDisplayString());
926namedArgs[0].Value.Type?.ToDisplayString() == JsonIgnoreConditionFullName)
933ReportDiagnostic(DiagnosticDescriptors.JsonIgnoreConditionAlwaysInvalidOnType, typeToGenerate.Location, typeToGenerate.Type.ToDisplayString());
949ReportDiagnostic(DiagnosticDescriptors.OpenGenericDerivedTypeCouldNotBeResolved, attributeData.GetLocation(), derivedType.ToDisplayString(), typeToGenerate.Type.ToDisplayString(), failureReason);
967ReportDiagnostic(DiagnosticDescriptors.PolymorphismNotSupported, typeToGenerate.Location, typeToGenerate.Type.ToDisplayString());
1190failedArg?.ToDisplayString() ?? string.Empty);
1265attributeType.ToDisplayString() == UnionAttributeFullName)
1488string unionTypeName = unionType.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat);
1493string caseTypeName = caseType.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat);
2328switch (attributeType.ToDisplayString())
2339namedArgs[0].Value.Type?.ToDisplayString() == JsonIgnoreConditionFullName)
2651ReportDiagnostic(DiagnosticDescriptors.DerivedJsonConverterAttributesNotSupported, attributeData.GetLocation(), attributeData.AttributeClass!.ToDisplayString());
2687ReportDiagnostic(DiagnosticDescriptors.JsonConverterAttributeInvalidType, attributeData.GetLocation(), converterType?.ToDisplayString() ?? "null", declaringSymbol.ToDisplayString());
2693ReportDiagnostic(DiagnosticDescriptors.JsonStringEnumConverterNotSupportedInAot, attributeData.GetLocation(), declaringSymbol.ToDisplayString());
2709ReportDiagnostic(DiagnosticDescriptors.JsonConverterAttributeInvalidType, attributeData.GetLocation(), classifierType?.ToDisplayString() ?? "null", declaringSymbol.ToDisplayString());
3079string display = type.ToDisplayString(s_fullyQualifiedWithConstraints);
System.Text.RegularExpressions.Generator (1)
System.Windows.Forms.Analyzers.CSharp (2)