using Modules.Library.Domain.Entities.Genre;

namespace Modules.Library.Domain.EntityBuilders;

public class GenreBuilder : EntityBuilder<Genre>
{
    private static readonly Func<Genre> CreateInstanceFunc = CreateInstanceFunction();
    private static readonly Action<GenreBuilder, Genre> SetInstanceFieldsAction = SetInstanceFieldsAction<GenreBuilder>();
    private readonly string _name;

    public GenreBuilder(string name) { _name = name; }

    public override Genre Build()
    {
        var result = CreateInstanceFunc();
        SetInstanceFieldsAction(this, result);
        return result;
    }
}