private static void AddProperties(this CodeTypeDeclaration targetClass, CodeNamespace codeNamespace, IRecordDescriptor descriptor, out bool hasArrayType)
 {
     hasArrayType = false;
     foreach (var field in descriptor.Fields)
     {
         if (field.Value.IsArray)
         {
             codeNamespace.GenerateClass((IRecordDescriptor)field.Value, $"{field.Key}Item", out hasArrayType);
             targetClass.AddArrayProperty(field.Key, $"{field.Key}Item");
             hasArrayType = true;
             continue;
         }
         targetClass.AddProperty(field.Key, field.Value);
     }
 }