ArchiMetrics.Analysis.Tests.DtoReadTests.GetConstructorArgs C# (CSharp) Method

GetConstructorArgs() private method

private GetConstructorArgs ( Type type ) : object[]
type System.Type
return object[]
        private object[] GetConstructorArgs(Type type)
        {
            var constructors = type.GetConstructors();
            if (constructors.Any(_ => _.GetParameters().Length == 0))
            {
                return new object[0];
            }

            return constructors.First().GetParameters().Select(x => "a").Cast<object>().ToArray();
        }
    }