Class FactoryMethodQuery
Selects public factory methods ordered by the modest first.
Inheritance
System.Object
FactoryMethodQuery
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 FactoryMethodQuery : IMethodQuery
Methods
| Improve this Doc View SourceSelectMethods(Type)
Selects the public factory methods 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 factory methods for |
Remarks
The ordering of the returned methods is based on the number of parameters of the method. Methods with fewer parameters are returned before methods with more parameters. This means that if a default parameterless factory methods exists, it will be the first one returned.
In case of two factory methods with an equal number of parameters, the ordering is unspecified.
Factory methods that contain parameters of the requested type
are skipped in order to avoid circular references.