10 references to ToDiagnostic
Microsoft.Interop.ComInterfaceGenerator (1)
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (1)
44context.ReportDiagnostic(comInterfaceAttribute.CreateDiagnosticInfo(GeneratorDiagnostics.InterfaceTypeNotSupported, unsupportedValue).ToDiagnostic());
Microsoft.Interop.LibraryImportGenerator (5)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
89context.ReportDiagnostic(method.CreateDiagnosticInfo(ConvertToLibraryImport, properties.ToImmutable(), method.Name).ToDiagnostic());
Analyzers\DiagnosticReporter.cs (1)
19public static DiagnosticReporter CreateForLocation(Location location, Action<Diagnostic> reportDiagnostic) => new((descriptor, properties, args) => reportDiagnostic(location.CreateDiagnosticInfo(descriptor, properties, args).ToDiagnostic()));
Analyzers\LibraryImportDiagnosticsAnalyzer.cs (3)
83endContext.ReportDiagnostic(DiagnosticInfo.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, null).ToDiagnostic()); 136context.ReportDiagnostic(invalidMethodDiagnostic.ToDiagnostic()); 147context.ReportDiagnostic(diagnostic.ToDiagnostic());
Microsoft.Interop.LibraryImportGenerator.Downlevel (3)
DownlevelLibraryImportDiagnosticsAnalyzer.cs (3)
77endContext.ReportDiagnostic(DiagnosticInfo.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, null).ToDiagnostic()); 137context.ReportDiagnostic(invalidMethodDiagnostic.ToDiagnostic()); 146context.ReportDiagnostic(diagnostic.ToDiagnostic());
Microsoft.Interop.SourceGeneration (1)
IncrementalGeneratorInitializationContextExtensions.cs (1)
57context.ReportDiagnostic(diagnostic.ToDiagnostic());