| | | 1 | | using Microsoft.CodeAnalysis; |
| | | 2 | | |
| | | 3 | | namespace NexusLabs.Needlr.Avalonia.Diagnostics; |
| | | 4 | | |
| | | 5 | | internal static class AvaloniaDiagnosticDescriptors |
| | | 6 | | { |
| | 1 | 7 | | public static readonly DiagnosticDescriptor ClassMustBePartial = new( |
| | 1 | 8 | | id: AvaloniaDiagnosticIds.ClassMustBePartial, |
| | 1 | 9 | | title: "Class must be partial", |
| | 1 | 10 | | messageFormat: "[GenerateAvaloniaDesignTimeConstructor] requires '{0}' to be partial. Add the 'partial' modifier |
| | 1 | 11 | | category: "NexusLabs.Needlr.Avalonia", |
| | 1 | 12 | | defaultSeverity: DiagnosticSeverity.Error, |
| | 1 | 13 | | isEnabledByDefault: true); |
| | | 14 | | |
| | 1 | 15 | | public static readonly DiagnosticDescriptor AlreadyHasParameterlessCtor = new( |
| | 1 | 16 | | id: AvaloniaDiagnosticIds.AlreadyHasParameterlessCtor, |
| | 1 | 17 | | title: "Parameterless constructor already exists", |
| | 1 | 18 | | messageFormat: "'{0}' already has a parameterless constructor. Remove it or remove [GenerateAvaloniaDesignTimeCo |
| | 1 | 19 | | category: "NexusLabs.Needlr.Avalonia", |
| | 1 | 20 | | defaultSeverity: DiagnosticSeverity.Error, |
| | 1 | 21 | | isEnabledByDefault: true); |
| | | 22 | | |
| | 1 | 23 | | public static readonly DiagnosticDescriptor NoParameterizedCtor = new( |
| | 1 | 24 | | id: AvaloniaDiagnosticIds.NoParameterizedCtor, |
| | 1 | 25 | | title: "No parameterized constructor found", |
| | 1 | 26 | | messageFormat: "'{0}' has no constructor with parameters. [GenerateAvaloniaDesignTimeConstructor] has no effect |
| | 1 | 27 | | category: "NexusLabs.Needlr.Avalonia", |
| | 1 | 28 | | defaultSeverity: DiagnosticSeverity.Warning, |
| | 1 | 29 | | isEnabledByDefault: true); |
| | | 30 | | |
| | 1 | 31 | | public static readonly DiagnosticDescriptor PrimaryConstructorNotSupported = new( |
| | 1 | 32 | | id: AvaloniaDiagnosticIds.PrimaryConstructorNotSupported, |
| | 1 | 33 | | title: "Primary constructors are not supported", |
| | 1 | 34 | | messageFormat: "'{0}' uses a primary constructor. [GenerateAvaloniaDesignTimeConstructor] cannot generate a safe |
| | 1 | 35 | | category: "NexusLabs.Needlr.Avalonia", |
| | 1 | 36 | | defaultSeverity: DiagnosticSeverity.Error, |
| | 1 | 37 | | isEnabledByDefault: true); |
| | | 38 | | } |