Catel.Reflection.TypeInfoExtensions.GetConstructor C# (CSharp) Метод

GetConstructor() публичный статический Метод

Gets the constructor with the specified types.
The is null.
public static GetConstructor ( this typeInfo, Type types, BindingFlags bindingFlags ) : ConstructorInfo
typeInfo this The .
types System.Type The types of the constructor.
bindingFlags BindingFlags The binding flags.
Результат System.Reflection.ConstructorInfo
        public static ConstructorInfo GetConstructor(this TypeInfo typeInfo, Type[] types, BindingFlags bindingFlags)
        {
            Argument.IsNotNull("typeInfo", typeInfo);

            return (from x in GetConstructors(typeInfo, bindingFlags)
                    where CollectionHelper.IsEqualTo(types, from parameterInfo in x.GetParameters()
                                                            select parameterInfo.ParameterType)
                    select x).FirstOrDefault();
        }