Skip to content

Commit

Permalink
add RecordDeclaration to accepted SyntaxKinds
Browse files Browse the repository at this point in the history
  • Loading branch information
JKronberger committed May 10, 2023
1 parent d3d17b2 commit 4533daf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Weingartner.Json.Migration.Roslyn/DataContractAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private static void OnCompilationStart(CompilationStartAnalysisContext context)
var dataMemberAttributeType = context.Compilation.GetTypeByMetadataName(Constants.DataMemberAttributeMetadataName);
if (migratableAttributeType != null)
{
context.RegisterSyntaxNodeAction(nodeContext => AnalyzeCall(nodeContext, migratableAttributeType, dataContractAttributeType, dataMemberAttributeType), SyntaxKind.ClassDeclaration, SyntaxKind.StructDeclaration);
context.RegisterSyntaxNodeAction(nodeContext => AnalyzeCall(nodeContext, migratableAttributeType, dataContractAttributeType, dataMemberAttributeType), SyntaxKind.ClassDeclaration, SyntaxKind.StructDeclaration, SyntaxKind.RecordDeclaration);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Weingartner.Json.Migration.Roslyn/MigrationHashAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private static void OnCompilationStart(CompilationStartAnalysisContext context)
var dataMemberAttributeType = context.Compilation.GetTypeByMetadataName(Constants.DataMemberAttributeMetadataName);
if (migratableAttributeType != null && dataMemberAttributeType != null)
{
context.RegisterSyntaxNodeAction(nodeContext => AnalyzeCall(nodeContext, migratableAttributeType, dataMemberAttributeType), SyntaxKind.ClassDeclaration, SyntaxKind.StructDeclaration);
context.RegisterSyntaxNodeAction(nodeContext => AnalyzeCall(nodeContext, migratableAttributeType, dataMemberAttributeType), SyntaxKind.ClassDeclaration, SyntaxKind.StructDeclaration, SyntaxKind.RecordDeclaration);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private static void OnCompilationStart(CompilationStartAnalysisContext context)
var migratableAttributeType = context.Compilation.GetTypeByMetadataName(Constants.MigratableAttributeMetadataName);
if (migratableAttributeType != null)
{
context.RegisterSyntaxNodeAction(nodeContext => AnalyzeCall(nodeContext, migratableAttributeType), SyntaxKind.ClassDeclaration, SyntaxKind.StructDeclaration);
context.RegisterSyntaxNodeAction(nodeContext => AnalyzeCall(nodeContext, migratableAttributeType), SyntaxKind.ClassDeclaration, SyntaxKind.StructDeclaration, SyntaxKind.RecordDeclaration);
}
}

Expand Down

0 comments on commit 4533daf

Please sign in to comment.