Class ArrayFavoringConstructorQuery
Selects public constructors ordered so that any constructor with array arguments are selected before any other public constructor.
Inheritance
System.Object
ArrayFavoringConstructorQuery
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 ArrayFavoringConstructorQuery : IMethodQuery
Remarks
The main target of this IMethodQuery implementation is to pick constructors with array arguments before any other constructor.
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
Given several constructors, this implementation will favor those constructors which contain array arguments. Constructors with most matching arguments are returned before constructors with less matching arguments.
Any other constructors are returned with the most modest constructors first.