Implement Complex

This commit is contained in:
Stef Heyenrath
2021-07-25 11:16:48 +02:00
parent 9326899151
commit e00c0c7706
9 changed files with 51 additions and 16 deletions
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.CodeAnalysis;
using ProxyInterfaceSourceGenerator.Enums;
@@ -92,8 +93,17 @@ namespace {symbol.ContainingNamespace}
// }
//}
//else
var existing = _context.CandidateInterfaces.Values.FirstOrDefault(x => x.TypeName == property.Type.ToString());
if (existing is not null)
{
str.AppendLine($" {property.ToPropertyText(existing.InterfaceName)}");
}
else
{
str.AppendLine($" {property.ToPropertyText()}");
}
str.AppendLine($" {property.ToPropertyText()}");
str.AppendLine();
}