<commit_before>﻿using System;
using System.Reflection;

namespace UnityWeld.Binding.Internal
{
    /// <summary>
    /// Data structure combining a bindable property or method with the view model it belongs 
    /// to. This is needed because we can't always rely on MemberInfo.ReflectedType
    /// returning the type of the view model if the property or method was declared in an 
    /// interface that the view model inherits from.
    /// </summary>
    public class BindableMember<MemberType> where MemberType : MemberInfo
    {
        /// <summary>
        /// The bindable member info (usually a PropertyInfo or MethodInfo)
        /// </summary>
        public MemberType Member { get; private set; }

        /// <summary>
        /// View model that the property or method belongs to.
        /// </summary>
        public Type ViewModelType { get; private set; }

        public BindableMember(MemberType member, Type viewModelType)
        {
            Member = member;
            ViewModelType = viewModelType;
        }

        public override string ToString()
        {
            return string.Concat(ViewModelType.ToString(), ".", Member.Name);
        }
    }
}<commit_msg>Changed properties in BindableMember to readonly fields<commit_after>﻿using System;
using System.Reflection;

namespace UnityWeld.Binding.Internal
{
    /// <summary>
    /// Data structure combining a bindable property or method with the view model it belongs 
    /// to. This is needed because we can't always rely on MemberInfo.ReflectedType
    /// returning the type of the view model if the property or method was declared in an 
    /// interface that the view model inherits from.
    /// </summary>
    public class BindableMember<MemberType> where MemberType : MemberInfo
    {
        /// <summary>
        /// The bindable member info (usually a PropertyInfo or MethodInfo)
        /// </summary>
        public readonly MemberType Member;

        /// <summary>
        /// View model that the property or method belongs to.
        /// </summary>
        public readonly Type ViewModelType;

        public BindableMember(MemberType member, Type viewModelType)
        {
            Member = member;
            ViewModelType = viewModelType;
        }

        public override string ToString()
        {
            return string.Concat(ViewModelType.ToString(), ".", Member.Name);
        }
    }
}
{'fraction_non_alphanumeric': 0.08699254349627175, 'fraction_numerical': 0.0, 'mean_word_length': 2.190224570673712, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '3096576', 'n_tokens_mistral': 600, 'n_tokens_neox': 578, 'n_words': 226}