<commit_before>using System.Diagnostics;
using HolzShots.Composition;
using HolzShots.IO;
using HolzShots.Windows.Forms.Controls;

namespace HolzShots.Windows.Forms
{
    public partial class PluginForm : Form
    {
        private readonly PluginFormModel _model;
        public PluginForm(PluginFormModel model)
        {
            InitializeComponent();
            Debug.Assert(model != null);

            SuspendLayout();

            _model = model;
            InitializeModel();

            ResumeLayout(true);
        }

        private void InitializeModel()
        {
            var items = _model.Plugins.Select(p => new PluginItem(p)).ToArray();
            PluginPanel.Controls.AddRange(items);
        }

        private void CloseButton_Click(object sender, EventArgs e) => Close();

        private void OpenPluginsDirectoryLabel_LinkClicked(object sender, EventArgs e)
        {
            HolzShotsPaths.OpenFolderInExplorer(_model.PluginDirectory);
        }
    }

    public class PluginFormModel
    {
        public IReadOnlyList<IPluginMetadata> Plugins { get; }
        public string PluginDirectory { get; }

        public PluginFormModel(IReadOnlyList<IPluginMetadata> plugins, string pluginDirectory)
        {
            Plugins = plugins ?? throw new ArgumentNullException(nameof(plugins));
            PluginDirectory = pluginDirectory ?? throw new ArgumentNullException(nameof(pluginDirectory));
        }
    }
}<commit_msg>Use record for PluginFormModel<commit_after>using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
using HolzShots.Composition;
using HolzShots.IO;
using HolzShots.Windows.Forms.Controls;

namespace HolzShots.Windows.Forms
{
    public partial class PluginForm : Form
    {
        private readonly PluginFormModel _model;
        public PluginForm(PluginFormModel model)
        {
            InitializeComponent();
            Debug.Assert(model != null);

            SuspendLayout();

            _model = model;
            InitializeModel();

            ResumeLayout(true);
        }

        private void InitializeModel()
        {
            var items = _model.Plugins.Select(p => new PluginItem(p)).ToArray();
            PluginPanel.Controls.AddRange(items);
        }

        private void CloseButton_Click(object sender, EventArgs e) => Close();

        private void OpenPluginsDirectoryLabel_LinkClicked(object sender, EventArgs e)
        {
            HolzShotsPaths.OpenFolderInExplorer(_model.PluginDirectory);
        }
    }

    public record PluginFormModel(IReadOnlyList<IPluginMetadata> Plugins, string PluginDirectory);
}
{'fraction_non_alphanumeric': 0.08111152835148329, 'fraction_numerical': 0.0, 'mean_word_length': 2.604871447902571, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4217117', 'n_tokens_mistral': 702, 'n_tokens_neox': 680, 'n_words': 147}