Beispiel #1
0
 public override void GenerateClear(FileGeneration fg, Accessor accessorPrefix)
 {
     if (this.Nullable)
     {
         fg.AppendLine($"{accessorPrefix} = null;");
     }
     else
     {
         SubTypeGeneration.GenerateClear(fg, $"{accessorPrefix}.Male");
         SubTypeGeneration.GenerateClear(fg, $"{accessorPrefix}.Female");
     }
 }
Beispiel #2
0
 public override void GenerateClear(FileGeneration fg, Accessor accessorPrefix)
 {
     if (this.Nullable)
     {
         fg.AppendLine($"{accessorPrefix} = null;");
     }
     else if (SubTypeGeneration is FormLinkType linkType)
     {
         fg.AppendLine($"{accessorPrefix}.Male = {linkType.DirectTypeName(getter: false)}.Null;");
         fg.AppendLine($"{accessorPrefix}.Female = {linkType.DirectTypeName(getter: false)}.Null;");
     }
     else
     {
         SubTypeGeneration.GenerateClear(fg, $"{accessorPrefix}.Male");
         SubTypeGeneration.GenerateClear(fg, $"{accessorPrefix}.Female");
     }
 }