private CSharpSyntaxGeneratorResult GenerateDataClass(
            DataTypeDescriptor descriptor,
            CSharpSyntaxGeneratorSettings settings)
        {
            if (settings.EntityRecords)
            {
                RecordDeclarationSyntax recordDeclarationSyntax =
                    RecordDeclaration(Token(SyntaxKind.RecordKeyword), descriptor.RuntimeType.Name)
                    .AddModifiers(
                        Token(SyntaxKind.PublicKeyword),
                        Token(SyntaxKind.PartialKeyword))
                    .AddGeneratedAttribute()
                    .AddSummary(descriptor.Documentation)
                    .AddImplements(descriptor.Implements)
                    .WithOpenBraceToken(Token(SyntaxKind.OpenBraceToken));

                // Adds the constructor
                ConstructorDeclarationSyntax constructor =
                    ConstructorDeclaration(descriptor.RuntimeType.Name)
                    .AddModifiers(Token(SyntaxKind.PublicKeyword));

                constructor = constructor.AddTypeParameter();

                ForEachProperty(
                    descriptor,
                    p => constructor = constructor.AddStateParameter(p));

                recordDeclarationSyntax = recordDeclarationSyntax.AddMembers(constructor);

                // Adds the property
                recordDeclarationSyntax = recordDeclarationSyntax.AddTypeProperty();

                ForEachProperty(
                    descriptor,
                    p => recordDeclarationSyntax = recordDeclarationSyntax.AddStateProperty(p));

                recordDeclarationSyntax = recordDeclarationSyntax.WithCloseBraceToken(
                    Token(SyntaxKind.CloseBraceToken));

                return(new(
                           descriptor.RuntimeType.Name,
                           State,
                           descriptor.RuntimeType.NamespaceWithoutGlobal,
                           recordDeclarationSyntax));
            }
            else
            {
                ClassDeclarationSyntax classDeclaration =
                    ClassDeclaration(descriptor.RuntimeType.Name)
                    .AddModifiers(
                        Token(SyntaxKind.PublicKeyword),
                        Token(SyntaxKind.PartialKeyword))
                    .AddGeneratedAttribute()
                    .AddSummary(descriptor.Documentation)
                    .AddImplements(descriptor.Implements);

                // Adds the constructor
                ConstructorDeclarationSyntax constructor =
                    ConstructorDeclaration(descriptor.RuntimeType.Name)
                    .AddModifiers(Token(SyntaxKind.PublicKeyword));

                constructor = constructor.AddTypeParameter();

                ForEachProperty(
                    descriptor,
                    p => constructor = constructor.AddStateParameter(p));

                classDeclaration = classDeclaration.AddMembers(constructor);

                // Adds the property
                classDeclaration = classDeclaration.AddTypeProperty();

                ForEachProperty(
                    descriptor,
                    p => classDeclaration = classDeclaration.AddStateProperty(p));

                return(new(
                           descriptor.RuntimeType.Name,
                           State,
                           descriptor.RuntimeType.NamespaceWithoutGlobal,
                           classDeclaration));
            }
        }