<commit_before>﻿using Toggle.Net.Configuration;
using Toggle.Net.Providers;

namespace Toggle.Net.Internal
{
	public class ToggleChecker : IToggleChecker
	{
		private readonly IFeatureProvider _featureProvider;
		private IUserProvider _userProvider;

		public ToggleChecker(IFeatureProvider featureProvider)
		{
			_featureProvider = featureProvider;
		}

		public bool IsEnabled(string flagName)
		{
			var feature = _featureProvider.Get(flagName);
			return feature != null && feature.IsEnabled(_userProvider.CurrentUser());
		}

		public void SetUserProvider(IUserProvider userProvider)
		{
			_userProvider = userProvider;
		}
	}
}<commit_msg>ToggleChecker shouldn't be instansiated directly<commit_after>﻿using Toggle.Net.Configuration;
using Toggle.Net.Providers;

namespace Toggle.Net.Internal
{
	public class ToggleChecker : IToggleChecker
	{
		private readonly IFeatureProvider _featureProvider;
		private IUserProvider _userProvider;

		internal ToggleChecker(IFeatureProvider featureProvider)
		{
			_featureProvider = featureProvider;
		}

		public bool IsEnabled(string flagName)
		{
			var feature = _featureProvider.Get(flagName);
			return feature != null && feature.IsEnabled(_userProvider.CurrentUser());
		}

		public void SetUserProvider(IUserProvider userProvider)
		{
			_userProvider = userProvider;
		}
	}
}
{'fraction_non_alphanumeric': 0.07738542449286251, 'fraction_numerical': 0.0, 'mean_word_length': 5.253521126760563, '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': '4428362', 'n_tokens_mistral': 424, 'n_tokens_neox': 384, 'n_words': 82}