<commit_before>using Uno;
using Uno.Collections;
using Uno.Text;
using Uno.Threading;
using Uno.IO;
using Uno.UX;

namespace Fuse.Scripting
{
	public interface IThreadWorker
	{
		void Invoke(Uno.Action<Scripting.Context> action);
	}

	public abstract class Context: Uno.IDisposable
	{
		ConcurrentDictionary<string, ModuleResult> _moduleResults = new ConcurrentDictionary<string, ModuleResult>();

		public void RegisterGlobalModuleResult(ModuleResult result)
		{
			if (result.Id == null) return;

			_moduleResults.Add(result.Id, result);
		}

		public ModuleResult TryGetGlobalModuleResult(string id)
		{
			if (id == null) return null;

			if (_moduleResults.ContainsKey(id)) return _moduleResults[id];
			return null;
		}

		internal void DeleteGlobalModuleResult(ModuleResult mr)
		{<commit_msg>Fuse.Scripting: use IDictionary-interface of ConcurrentDictionary<commit_after>using Uno;
using Uno.Collections;
using Uno.Text;
using Uno.Threading;
using Uno.IO;
using Uno.UX;

namespace Fuse.Scripting
{
	public interface IThreadWorker
	{
		void Invoke(Uno.Action<Scripting.Context> action);
	}

	public abstract class Context: Uno.IDisposable
	{
		IDictionary<string, ModuleResult> _moduleResults = new ConcurrentDictionary<string, ModuleResult>();

		public void RegisterGlobalModuleResult(ModuleResult result)
		{
			if (result.Id == null) return;

			_moduleResults.Add(result.Id, result);
		}

		public ModuleResult TryGetGlobalModuleResult(string id)
		{
			if (id == null) return null;

			if (_moduleResults.ContainsKey(id)) return _moduleResults[id];
			return null;
		}

		internal void DeleteGlobalModuleResult(ModuleResult mr)
		{
{'fraction_non_alphanumeric': 0.09300911854103343, 'fraction_numerical': 0.0, 'mean_word_length': 5.118959107806692, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1986923', 'n_tokens_mistral': 560, 'n_tokens_neox': 507, 'n_words': 124}