<commit_before>﻿
namespace AncoraMVVM.Base.Interfaces
{
    /// <summary>
    /// Provides better type safety.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class ConfigItem<T>
    {
        public string Key { get; set; }
        public T DefaultValue { get; set; }
    }

    public interface IConfigurationManager
    {
        T Get<T>(ConfigItem<T> key);

        void Set<T>(ConfigItem<T> key, T item);
    }
}<commit_msg>Shortcut to get config items.<commit_after>﻿
using AncoraMVVM.Base.IoC;
namespace AncoraMVVM.Base.Interfaces
{
    /// <summary>
    /// Provides better type safety.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class ConfigItem<T>
    {
        public string Key { get; set; }
        public T DefaultValue { get; set; }

        public T Get()
        {
            var config = Dependency.Resolve<IConfigurationManager>();
            return config.Get(this);
        }
    }

    public interface IConfigurationManager
    {
        T Get<T>(ConfigItem<T> key);

        void Set<T>(ConfigItem<T> key, T item);
    }
}
{'fraction_non_alphanumeric': 0.1318181818181818, 'fraction_numerical': 0.0, 'mean_word_length': 2.145714285714286, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, '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': '2268960', 'n_tokens_mistral': 342, 'n_tokens_neox': 335, 'n_words': 84}