<commit_before>﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Typed.Xaml;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace Sirloin.Internal
{
    public sealed class BindingPaths
    {
        private BindingPaths()
        {
            throw new InvalidOperationException("This class shouldn't be instantiated.");
        }

        // Content

        public static readonly DependencyProperty ContentProperty =
            Dependency.RegisterAttached<string, ContentControl, BindingPaths>("Content", ContentChanged);

        public static string GetContent(DependencyObject o) =>
            o.Get<string>(ContentProperty);

        public static void SetContent(DependencyObject o, string value) =>
            o.Set(ContentProperty, value);

        private static void ContentChanged(ContentControl o, IPropertyChangedArgs<string> args) =>
            o.SetBinding(ContentControl.ContentProperty, args.NewValue);

        // Height

        public static readonly DependencyProperty HeightProperty =
            Dependency.RegisterAttached<string, FrameworkElement, BindingPaths>("Height", HeightChanged);

        public static string GetHeight(DependencyObject o) =>
            o.Get<string>(HeightProperty);

        public static void SetHeight(DependencyObject o, string value) =>
            o.Set(HeightProperty, value);

        private static void HeightChanged(FrameworkElement o, IPropertyChangedArgs<string> args) =>
            o.SetBinding(FrameworkElement.HeightProperty, args.NewValue);

        // Width

        public static readonly DependencyProperty WidthProperty =
            Dependency.RegisterAttached<string, FrameworkElement, BindingPaths>("Width", WidthChanged);

        public static string GetWidth(DependencyObject o) =>
            o.Get<string>(WidthProperty);

        public static void SetWidth(DependencyObject o, string value) =>
            o.Set(WidthProperty, value);

        private static void WidthChanged(FrameworkElement o, IPropertyChangedArgs<string> args) =>
            o.SetBinding(FrameworkElement.WidthProperty, args.NewValue);
    }
}
<commit_msg>Tidy up BindingPaths a bit<commit_after>﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Typed.Xaml;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace Sirloin.Internal
{
    public sealed class BindingPaths
    {
        private BindingPaths()
        {
            throw new InvalidOperationException("This class shouldn't be instantiated.");
        }

        // Content

        public static readonly DependencyProperty ContentProperty =
            Dependency.RegisterAttached<string, ContentControl, BindingPaths>("Content", ContentChanged);

        public static string GetContent(DependencyObject obj) => obj.Get<string>(ContentProperty);

        public static void SetContent(DependencyObject obj, string value) => obj.Set(ContentProperty, value);

        private static void ContentChanged(ContentControl control, IPropertyChangedArgs<string> args)
        {
            control.SetBinding(ContentControl.ContentProperty, args.NewValue);
        }

        // Height

        public static readonly DependencyProperty HeightProperty =
            Dependency.RegisterAttached<string, FrameworkElement, BindingPaths>("Height", HeightChanged);

        public static string GetHeight(DependencyObject obj) => obj.Get<string>(HeightProperty);

        public static void SetHeight(DependencyObject obj, string value) => obj.Set(HeightProperty, value);

        private static void HeightChanged(FrameworkElement element, IPropertyChangedArgs<string> args)
        {
            element.SetBinding(FrameworkElement.HeightProperty, args.NewValue);
        }

        // Width

        public static readonly DependencyProperty WidthProperty =
            Dependency.RegisterAttached<string, FrameworkElement, BindingPaths>("Width", WidthChanged);

        public static string GetWidth(DependencyObject obj) => obj.Get<string>(WidthProperty);

        public static void SetWidth(DependencyObject obj, string value) => obj.Set(WidthProperty, value);

        private static void WidthChanged(FrameworkElement element, IPropertyChangedArgs<string> args)
        {
            element.SetBinding(FrameworkElement.WidthProperty, args.NewValue);
        }
    }
}

{'fraction_non_alphanumeric': 0.08237378210806023, 'fraction_numerical': 0.0, 'mean_word_length': 3.3854368932038836, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 36, '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': '5097341', 'n_tokens_mistral': 1111, 'n_tokens_neox': 1039, 'n_words': 274}