<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Ploeh.AutoFixture.Kernel;
using Rhino.Mocks;

namespace Ploeh.AutoFixture.AutoRhinoMock
{
    public class RhinoMockConstructorMethod: IMethod
    {
        private readonly ConstructorInfo ctor;
        private readonly ParameterInfo[] paramInfos;

        public RhinoMockConstructorMethod(ConstructorInfo constructorInfo, ParameterInfo[] parameterInfos)
        {
            if (constructorInfo == null)
            {
                throw new ArgumentNullException("constructorInfo");
            }
            if (parameterInfos == null)
            {
                throw new ArgumentNullException("parameterInfos");
            }

            this.ctor = constructorInfo;
            this.paramInfos = parameterInfos;
        }

        #region IMethod Members

        public IEnumerable<ParameterInfo> Parameters
        {
            get { return this.paramInfos; }
        }

        public object Invoke(IEnumerable<object> parameters)
        {
            return MockRepository.GenerateMock(this.ctor.DeclaringType, Enumerable.Empty<Type>().ToArray(), parameters.ToArray());
        }

        #endregion
    }

}<commit_msg>Replaced creation of an empty array with slightly terser syntax for better readability.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Ploeh.AutoFixture.Kernel;
using Rhino.Mocks;

namespace Ploeh.AutoFixture.AutoRhinoMock
{
    public class RhinoMockConstructorMethod: IMethod
    {
        private readonly ConstructorInfo ctor;
        private readonly ParameterInfo[] paramInfos;

        public RhinoMockConstructorMethod(ConstructorInfo constructorInfo, ParameterInfo[] parameterInfos)
        {
            if (constructorInfo == null)
            {
                throw new ArgumentNullException("constructorInfo");
            }
            if (parameterInfos == null)
            {
                throw new ArgumentNullException("parameterInfos");
            }

            this.ctor = constructorInfo;
            this.paramInfos = parameterInfos;
        }

        #region IMethod Members

        public IEnumerable<ParameterInfo> Parameters
        {
            get { return this.paramInfos; }
        }

        public object Invoke(IEnumerable<object> parameters)
        {
            return MockRepository.GenerateMock(this.ctor.DeclaringType, new Type[0], parameters.ToArray());
        }

        #endregion
    }

}
{'fraction_non_alphanumeric': 0.07458024209293244, 'fraction_numerical': 0.0003904724716907458, 'mean_word_length': 2.331599479843953, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '1683153', 'n_tokens_mistral': 641, 'n_tokens_neox': 623, 'n_words': 143}