<commit_before>﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Argument.expression.cs" company="Catel development team">
//   Copyright (c) 2008 - 2013 Catel development team. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace Catel
{
    using System;
    using System.Diagnostics;
    using System.Linq.Expressions;
    using System.Text.RegularExpressions;
    using Data;

    /// <summary>
    /// Argument validator class to help validating arguments that are passed into a method.
    /// <para />
    /// This class automatically adds thrown exceptions to the log file.
    /// </summary>
    public static partial class Argument
    {
        #region Methods

        /// <summary>
        /// The get parameter info.
        /// </summary>
        /// <typeparam name="T">The type of the parameter.</typeparam>
        /// <param name="expression">The expression.</param>
        /// <returns>The <see cref="ParameterInfo{T}" />.</returns>
        /// <exception cref="System.ArgumentException">The <paramref name="expression" /> body is not of type <see cref="MemberExpression" />.</exception>
        /// <exception cref="System.ArgumentNullException">The <paramref name="expression" /> is <c>null</c>.</exception>
        private static ParameterInfo<T> GetParameterInfo<T>(Expression<Func<T>> expression)
        {
            IsNotNull("expression", expression);

            var bodyExpression = expression.Body.ToString();

            var parameterExpression = (MemberExpression)expression.Body;
            var parameterInfo = new ParameterInfo<T>(parameterExpression.Member.Name, expression.Compile().Invoke());

            return parameterInfo;<commit_msg>Removed unnecessary call in Argument.expression.cs<commit_after>﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Argument.expression.cs" company="Catel development team">
//   Copyright (c) 2008 - 2013 Catel development team. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace Catel
{
    using System;
    using System.Diagnostics;
    using System.Linq.Expressions;
    using System.Text.RegularExpressions;
    using Data;

    /// <summary>
    /// Argument validator class to help validating arguments that are passed into a method.
    /// <para />
    /// This class automatically adds thrown exceptions to the log file.
    /// </summary>
    public static partial class Argument
    {
        #region Methods

        /// <summary>
        /// The get parameter info.
        /// </summary>
        /// <typeparam name="T">The type of the parameter.</typeparam>
        /// <param name="expression">The expression.</param>
        /// <returns>The <see cref="ParameterInfo{T}" />.</returns>
        /// <exception cref="System.ArgumentException">The <paramref name="expression" /> body is not of type <see cref="MemberExpression" />.</exception>
        /// <exception cref="System.ArgumentNullException">The <paramref name="expression" /> is <c>null</c>.</exception>
        private static ParameterInfo<T> GetParameterInfo<T>(Expression<Func<T>> expression)
        {
            IsNotNull("expression", expression);

            var parameterExpression = (MemberExpression)expression.Body;
            var parameterInfo = new ParameterInfo<T>(parameterExpression.Member.Name, expression.Compile().Invoke());

            return parameterInfo;
{'fraction_non_alphanumeric': 0.2395305414777274, 'fraction_numerical': 0.004267804747932782, 'mean_word_length': 1.8153153153153154, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 59, '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': '3745717', 'n_tokens_mistral': 833, 'n_tokens_neox': 802, 'n_words': 238}