init properties support

This commit is contained in:
daver32
2021-08-14 13:38:21 +02:00
parent 35f8b0a159
commit ce722408cf
2 changed files with 28 additions and 2 deletions
+8 -1
View File
@@ -254,7 +254,14 @@ namespace InterfaceGenerator
if (hasPublicSetter)
{
writer.Write("set; ");
if (propertySymbol.SetMethod!.IsInitOnly)
{
writer.Write("init; ");
}
else
{
writer.Write("set; ");
}
}
writer.WriteLine("}");