Class GreedyConstructorQuery
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Selects public constructors ordered by the most greedy constructor first.
public class GreedyConstructorQuery : IMethodQueryInheritance
object ← GreedyConstructorQuery
Implements
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
GreedyConstructorQuery()
public GreedyConstructorQuery()Methods
SelectMethods(Type)
Selects the constructors for the supplied type.
public IEnumerable<IMethod> SelectMethods(Type type)Parameters
type Type
The type.
Returns
All public constructors for type, ordered by the most greedy
constructor first.
Remarks
The ordering of the returned constructors is based on the number of parameters of the constructor. Constructors with more parameters are returned before constructors with fewer parameters. This means that if a default constructor exists, it will be the last one returned.
In case of two constructors with an equal number of parameters, the ordering is unspecified.