<commit_before>﻿using System.IO;
using MessagePack;
using MessagePack.Resolvers;

namespace Obvs.Serialization.MessagePack
{
    public class MessagePackCSharpMessageSerializer : IMessageSerializer
    {
        private readonly IFormatterResolver _resolver;

        public MessagePackCSharpMessageSerializer()
            : this(null)
        {
        }

        public MessagePackCSharpMessageSerializer(IFormatterResolver resolver)
        {
            _resolver = resolver ?? StandardResolver.Instance;
        }

        public void Serialize(Stream destination, object message)
        {
            MessagePackSerializer.Serialize(destination, message, _resolver);
        }
    }
}
<commit_msg>Use NonGeneric entry point for MessagePack-CSharp serializer<commit_after>﻿using System.IO;
using MessagePack;
using MessagePack.Resolvers;

namespace Obvs.Serialization.MessagePack
{
    public class MessagePackCSharpMessageSerializer : IMessageSerializer
    {
        private readonly IFormatterResolver _resolver;

        public MessagePackCSharpMessageSerializer()
            : this(null)
        {
        }

        public MessagePackCSharpMessageSerializer(IFormatterResolver resolver)
        {
            _resolver = resolver ?? StandardResolver.Instance;
        }

        public void Serialize(Stream destination, object message)
        {
            MessagePackSerializer.NonGeneric.Serialize(message.GetType(), destination, message, _resolver);
        }
    }
}

{'fraction_non_alphanumeric': 0.06321452589105582, 'fraction_numerical': 0.0, 'mean_word_length': 2.8851174934725847, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3405185', 'n_tokens_mistral': 370, 'n_tokens_neox': 362, 'n_words': 75}