Adf.ObjectFactory.ObjectBuilder.BuilderPolicies.CreationPolicy.SelectConstructor C# (CSharp) Method

SelectConstructor() public method

public SelectConstructor ( IBuilderContext context, Type type, string id ) : ConstructorInfo
context IBuilderContext
type Type
id string
return ConstructorInfo
        public ConstructorInfo SelectConstructor(IBuilderContext context, Type type, string id)
        {
            if(type != null)
            {
                ConstructorInfo[] constructors = type.GetConstructors();

                if (constructors.Length > 0)
                    return constructors[0];
            }
            return null;
        }