<commit_before>﻿namespace TweeterTotters
{
    using System;
    using System.Diagnostics.CodeAnalysis;
    using System.Windows;
    using System.Windows.Data;

    /// <summary>
    /// Used to determine if the text block watermark should be displayed.
    /// </summary>
    public class TextBoxTextToVisibilityConverter : IMultiValueConverter
    {
        /// <summary>
        /// Converts a Textbox to a Visibility enumeration value.
        /// </summary>
        [SuppressMessage("StyleCop.CSharp.DocumentationRules", "*", Justification = "Microsoft Interface")]
        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (values[0] is bool && values[1] is bool)
            {
                bool hasText = !(bool)values[0];
                bool hasFocus = (bool)values[1];

                if (hasFocus || hasText)
                {
                    return Visibility.Collapsed;
                }
            }

            return Visibility.Visible;
        }
        
        /// <summary>
        /// Not implemented by the application.
        /// </summary><commit_msg>Fixed some commenting<commit_after>﻿namespace TweeterTotters
{
    using System;
    using System.Diagnostics.CodeAnalysis;
    using System.Windows;
    using System.Windows.Data;

    /// <summary>
    /// Used to determine if a watermark should be displayed on a text block.
    /// </summary>
    public class TextBoxTextToVisibilityConverter : IMultiValueConverter
    {
        /// <summary>
        /// Returns a visibility depending on whether a textbox is empty or is in focus.
        /// </summary>
        [SuppressMessage("StyleCop.CSharp.DocumentationRules", "*", Justification = "Microsoft Interface")]
        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (values[0] is bool && values[1] is bool)
            {
                bool hasText = !(bool)values[0];
                bool hasFocus = (bool)values[1];

                if (hasFocus || hasText)
                {
                    return Visibility.Collapsed;
                }
            }

            return Visibility.Visible;
        }
        
        /// <summary>
        /// Not implemented by the application.
        /// </summary>
{'fraction_non_alphanumeric': 0.10125523012552301, 'fraction_numerical': 0.0033472803347280333, 'mean_word_length': 1.8030480656506447, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5210831', 'n_tokens_mistral': 602, 'n_tokens_neox': 583, 'n_words': 165}