mirror of
https://github.com/AlexMacocian/SystemExtensions.git
synced 2026-07-15 14:19:29 +00:00
Fix generators project
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.Text;
|
||||
|
||||
namespace System.Extensions
|
||||
namespace System.Extensions;
|
||||
|
||||
internal static class Diagnostics
|
||||
{
|
||||
internal static class Diagnostics
|
||||
{
|
||||
public const string DependencyPropertyGenerator_NoAttributeFound = "DGD 0001";
|
||||
public const string DependencyPropertyGenerator_ClassMustBeTopLevel = "DGD 1001";
|
||||
public const string DependencyPropertyGenerator_ClassMustBePartial = "DGD 1002";
|
||||
@@ -16,10 +16,10 @@ namespace System.Extensions
|
||||
DependencyPropertyGenerator_NoAttributeFound,
|
||||
$"{attributeNamespace}.{attributeName} not found",
|
||||
"Could not find attribute with name {0} in namespace {1}.",
|
||||
"WpfExtended.SourceGeneration",
|
||||
"SystemExtensions.NetStandard.Generators",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
$"This error occurs when the attribute generated by the {nameof(DependencyPropertyGenerator)} is not found",
|
||||
$"This error occurs when the attribute generated by the {nameof(NotifyPropertyChangedGenerator)} is not found",
|
||||
null),
|
||||
Location.None,
|
||||
attributeName, attributeNamespace);
|
||||
@@ -29,7 +29,7 @@ namespace System.Extensions
|
||||
DependencyPropertyGenerator_ClassMustBeTopLevel,
|
||||
$"{className} must be top level",
|
||||
"Class {0} must be top level. It is currently declared under {1}.",
|
||||
"WpfExtended.SourceGeneration",
|
||||
"SystemExtensions.NetStandard.Generators",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
null,
|
||||
@@ -42,7 +42,7 @@ namespace System.Extensions
|
||||
DependencyPropertyGenerator_ClassMustBePartial,
|
||||
$"{className} is not partial",
|
||||
"Class {0} must be marked as partial in order for the generator to work",
|
||||
"WpfExtended.SourceGeneration",
|
||||
"SystemExtensions.NetStandard.Generators",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
null,
|
||||
@@ -55,7 +55,7 @@ namespace System.Extensions
|
||||
DependencyPropertyGenerator_ClassMustBeInNamespace,
|
||||
$"{className} is not defined in a namespace",
|
||||
"Class {0} must be defined inside a namespace for the generator to work",
|
||||
"WpfExtended.SourceGeneration",
|
||||
"SystemExtensions.NetStandard.Generators",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
null,
|
||||
@@ -68,12 +68,11 @@ namespace System.Extensions
|
||||
DependencyPropertyGenerator_ClassMustImplementINotifyPropertyChanged,
|
||||
$"{className} must implement INotifyPropertyChanged",
|
||||
"Class {0} must implement INotifyPropertyChanged for the generator to work",
|
||||
"WpfExtended.SourceGeneration",
|
||||
"SystemExtensions.NetStandard.Generators",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
null,
|
||||
null),
|
||||
Location.None,
|
||||
className);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Authors>Alexandru Macocian</Authors>
|
||||
<Description>Source generators extensions for netstandard2.0.</Description>
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<Version>0.1.0</Version>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
|
||||
Reference in New Issue
Block a user