Files
Telegrator/dev/Telegrator.RoslynGenerators/RoslynExtensions/DiagnosticsHelper.cs
T
Rikitav 16440bcf43 * Added protection from NotImplementedException to HandlerBuilderBase
* Moved AddHandler<T> and AddHandler(Type) methods from IHandlersCollection to extension methods
* Added public constructor to IHost types form extensibility
* Code cleanup
2025-08-19 04:33:02 +04:00

17 lines
720 B
C#

using Microsoft.CodeAnalysis;
namespace Telegrator.RoslynGenerators.RoslynExtensions
{
public static class DiagnosticsHelper
{
public static Diagnostic Create(this DiagnosticDescriptor descriptor, Location? location, params object[] messageArgs)
=> Diagnostic.Create(descriptor, location, messageArgs);
public static void Report(this Diagnostic diagnostic, SourceProductionContext context)
=> context.ReportDiagnostic(diagnostic);
public static void Report(this DiagnosticDescriptor descriptor, SourceProductionContext context, Location? location, params object[] messageArgs)
=> descriptor.Create(location, messageArgs).Report(context);
}
}