diff --git a/AutoMapProperty/AutoMapProperty.cs b/AutoMapProperty/AutoMapProperty.cs index 47b7898..0f43f2f 100644 --- a/AutoMapProperty/AutoMapProperty.cs +++ b/AutoMapProperty/AutoMapProperty.cs @@ -581,7 +581,7 @@ namespace AutoMapProperty return null; StringBuilder sb = new StringBuilder(); - sb.Append(Key).Append(" = (").Append(GetFullString(Value.ToType)).Append(@")").Append(GetFullMethodName(Value.CustomFromMethod)).Append(@"(providers, this, source.").Append(Key).Append(")"); + sb.Append(Key).Append(" = (").Append(GetFullString(Value.ToType)).Append(@")").Append(GetFullMethodName(Value.CustomFromMethod)).Append(@"(providers, source, source.").Append(Key).Append(")"); return sb.ToString(); } } @@ -833,6 +833,10 @@ namespace ").Append(classToGenerate.Namespace).Append(@" public int GetHashCode(").Append(classToGenerate.Name).Append(@" obj) { return obj.GetHashCode(); + } + public override int GetHashCode() + { + return 7; }"); var abstr = cds.Modifiers.Any(x => x.IsKind(SyntaxKind.AbstractKeyword));