You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate map partial keyword diagnostics And Constructor missing Diagnostics (#39)
* Add `AOM105` diagnostic to enforce `partial` keyword requirement for classes in mapper generation
* Add unit tests for `AOM105` diagnostic validation and adjust `MapperGenerator` syntax checking
* Add `AOM207` diagnostic for missing public constructor or factory method validation; update generator logic, tests, and analyzer release notes
* Fix nullable syntax reference usages and correct variable typo in `MapperGenerator` and related files
* Add unit test for `AOM207` diagnostic validation in `NoConstructorTests` when no empty constructor avaliable
if(!info.DestinationType.TryGetBlankTypeConstructor(info,outvarctor,outvarctorArgs)&&!info.DestinationType.IsAbstract&&info.DestinationType.TypeKindis not TypeKind.Interface)
if(TryBuildAssignmentExpression(compilation,srcProp.Type,destProp.Type,$"src.{srcProp.Name}",srcProp.NullableAnnotationis not NullableAnnotation.None,outvarexpression))
140
+
if(TryBuildAssignmentExpression(compilation,context,srcProp.Type,destProp.Type,$"src.{srcProp.Name}",srcProp.NullableAnnotationis not NullableAnnotation.None,outvarexpression))
141
141
assignments.Add(new(destProp,expression));
142
142
}
143
143
@@ -166,7 +166,7 @@ public MethodGenerationInfo(ITypeSymbol mapperType, AttributeData mapAttr)
if(TryBuildAssignmentExpression(compilation,sourceElementType,destinationElementType,"x",destinationElementType.NullableAnnotationis not NullableAnnotation.None,outvarelementExpression))
247
+
if(TryBuildAssignmentExpression(compilation,context,sourceElementType,destinationElementType,"x",destinationElementType.NullableAnnotationis not NullableAnnotation.None,outvarelementExpression))
0 commit comments