Class GreedyConstructorQuery
Selects public constructors ordered by the most greedy constructor first.
Inheritance
System.Object
GreedyConstructorQuery
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Syntax
public class GreedyConstructorQuery : IMethodQuery
Methods
| Improve this Doc View SourceSelectMethods(Type)
Selects the constructors for the supplied type.
Declaration
public IEnumerable<IMethod> SelectMethods(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMethod> | All public constructors for |
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.