<commit_before>﻿namespace SlimMessageBus.Host.AzureEventHub
{
    using SlimMessageBus.Host.Config;
    using System;

    internal static class SettingsExtensions
    {
        private const string GroupKey = "Eh_Group";
        private const string KeyProviderKey = "Eh_KeyProvider";

        public static void SetGroup(this AbstractConsumerSettings consumerSettings, string group) 
            => consumerSettings.Properties[GroupKey] = group;

        public static string GetGroup(this AbstractConsumerSettings consumerSettings) 
            => consumerSettings.Properties[GroupKey] as string;

        public static void SetKeyProvider(this ProducerSettings producerSettings, Func<object, string> keyProvider) 
            => producerSettings.Properties[KeyProviderKey] = keyProvider;

        public static Func<object, string> GetKeyProvider(this ProducerSettings producerSettings) 
            => producerSettings.Properties[KeyProviderKey] as Func<object, string>;
    }
}<commit_msg>[Host.AzureEventHub] Partition key provider should not be mandatory<commit_after>﻿namespace SlimMessageBus.Host.AzureEventHub
{
    using SlimMessageBus.Host.Config;
    using System;

    internal static class SettingsExtensions
    {
        private const string GroupKey = "Eh_Group";
        private const string KeyProviderKey = "Eh_KeyProvider";

        public static void SetGroup(this AbstractConsumerSettings consumerSettings, string group)
            => consumerSettings.Properties[GroupKey] = group;

        public static string GetGroup(this AbstractConsumerSettings consumerSettings)
            => consumerSettings.Properties[GroupKey] as string;

        public static void SetKeyProvider(this ProducerSettings producerSettings, Func<object, string> keyProvider)
            => producerSettings.Properties[KeyProviderKey] = keyProvider;

        public static Func<object, string> GetKeyProvider(this ProducerSettings producerSettings)
            => producerSettings.Properties.ContainsKey(KeyProviderKey) ? producerSettings.Properties[KeyProviderKey] as Func<object, string> : null;
    }
}
{'fraction_non_alphanumeric': 0.0679334916864608, 'fraction_numerical': 0.0, 'mean_word_length': 4.002375296912114, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, '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': '4667893', 'n_tokens_mistral': 503, 'n_tokens_neox': 482, 'n_words': 131}