diff --git a/Weingartner.Json.Migration.Roslyn/DataContractAnalyzer.cs b/Weingartner.Json.Migration.Roslyn/DataContractAnalyzer.cs index 6aedb11..df5ee27 100644 --- a/Weingartner.Json.Migration.Roslyn/DataContractAnalyzer.cs +++ b/Weingartner.Json.Migration.Roslyn/DataContractAnalyzer.cs @@ -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); } } diff --git a/Weingartner.Json.Migration.Roslyn/MigrationHashAnalyzer.cs b/Weingartner.Json.Migration.Roslyn/MigrationHashAnalyzer.cs index bde91af..dd91ba3 100644 --- a/Weingartner.Json.Migration.Roslyn/MigrationHashAnalyzer.cs +++ b/Weingartner.Json.Migration.Roslyn/MigrationHashAnalyzer.cs @@ -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); } } diff --git a/Weingartner.Json.Migration.Roslyn/MigrationMethodAnalyzer.cs b/Weingartner.Json.Migration.Roslyn/MigrationMethodAnalyzer.cs index 9653de0..f869824 100644 --- a/Weingartner.Json.Migration.Roslyn/MigrationMethodAnalyzer.cs +++ b/Weingartner.Json.Migration.Roslyn/MigrationMethodAnalyzer.cs @@ -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); } }