<commit_before>﻿// <copyright file="Target.cs" company="<NAME>">
//  Opus
// </copyright>
// <summary>Opus Core</summary>
// <author><NAME></author>
namespace Opus.Core
{
    public sealed class Target
    {
        private static System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<IToolset, Target>> map = new System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<IToolset, Target>>();
        private static System.Collections.Generic.Dictionary<int, Target> mapNullToolset = new System.Collections.Generic.Dictionary<int, Target>();

        public string Key
        {
            get;
            private set;
        }

        private BaseTarget BaseTarget
        {
            get;
            set;
        }

        public IToolset Toolset
        {
            get;
            private set;
        }

        private static Target GetInstance(BaseTarget baseTarget)
        {
            Target target = null;
            if (mapNullToolset.ContainsKey(baseTarget.HashKey))
            {
                target = mapNullToolset[baseTarget.HashKey];
            }
            else
            {
                target = mapNullToolset[baseTarget.HashKey] = new Target(baseTarget);
            }

            return target;
        }

        public static Target GetInstance(BaseTarget baseTarget, IToolset toolset)
        {
            if (null == toolset)
            {
                throw new Exception("Toolset interface must not be null");
            }

            Target target = null;
            if (!map.ContainsKey(baseTarget.HashKey))
            {<commit_msg>[trunk] Targets can no longer be created without an IToolset<commit_after>// <copyright file="Target.cs" company="<NAME>">
//  Opus
// </copyright>
// <summary>Opus Core</summary>
// <author><NAME></author>
namespace Opus.Core
{
    public sealed class Target
    {
        private static System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<IToolset, Target>> map = new System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<IToolset, Target>>();

        public string Key
        {
            get;
            private set;
        }

        private BaseTarget BaseTarget
        {
            get;
            set;
        }

        public IToolset Toolset
        {
            get;
            private set;
        }

        public static Target GetInstance(BaseTarget baseTarget, IToolset toolset)
        {
            if (null == toolset)
            {
                throw new Exception("Toolset interface must not be null");
            }

            Target target = null;
            if (!map.ContainsKey(baseTarget.HashKey))
            {
{'fraction_non_alphanumeric': 0.0954627949183303, 'fraction_numerical': 0.0, 'mean_word_length': 1.8008130081300813, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '4582452', 'n_tokens_mistral': 700, 'n_tokens_neox': 682, 'n_words': 166}